Nit picky in my opinion, but the reason I didn't assign it a number and rather opted for the more generic "nearly infinite" is because there are a ton of possibilities.
Here is my idea for you and will eventually come up with most solutions (might miss some outliers, this is my <5 minutes of thought on the topic):
Write a program that shows a square and it's center point.
A single line increment out from the center point going at a random starting angle between 181 and 360 (in other words, they generally tend toward going left). The line moves the smallest amount possible each iteration (1 pixel for example).
After the line has moved one pixel, a new angle is picked for the line move, from 0-360, and it increments 1 more pixel. If the randomly generated line crosses the center line of the square (if you folded the square in half from left to right) force the line to randomly pick a new angle before incrementing.
Do not allow the line to cross over itself.
Now you have your first line. Take this line, replicate it, rotating it 90 degrees, then 180, then 270.
This is your first square. Set the program to keep generating new squares, add rules as you see fit.
Now you have more solutions to this puzzle than you can count.
Edit: This is pretty badly explained, but it is based on the idea of a single line leaving the midpoint, moving randomly until it reaches an edge. You then replicate that single line 3 more times, each rotating by 90 additional degrees.