The following list will rank all Zelda games by counting the number of possible orders, in which the main dungeons can be played. (This is the order in what the dungeons must be visited. Some games allow that you simply take an item from a dungeon and save the rest for later, so the orders in what the dungeons can be completed is an entirely different beast.)
The Legend of Zelda: 872
A Link to the Past: 66
Ocarina of Time: 7 (55)
Four Swords, Phantom Hourglass: 6
Oracle of Seasons: 2
the other 10 games: 1
I tried to count all possibly orders in The Legend of Zelda, but it's just so much that I had to use this program. There are very few restrictions here. Levels 2 and 8 can basically played at any given time. Yes, you can play and beat the eight dungeons first, which sounds crazy, but you can try. You need the Bow from the first dungeon to beat Level 6. You need the Raft from Level 3 to access Level 4. And you need the Stepladder from Level 4 to beat Level 5, 6 and 7. And the Flute from Level 5 to enter and beat Level 7. That's pretty much it and results in many, many different orders.
A Link to the Past is somewhat more linear, but the restrictions here are very simple. You need the Hammer from the Dark Palace to get to any other part of the Dark World. And you need the Titan's Mitts to enter Ice Palace, Misery Mire and Turtle Rock. Turtle Rock additionally needs the Fire Rod and the Cane of Somaria. That's it, which results in 66 different orders (source).
Ocarina of Time is usually considered to be very linear, because of Navi, which guides you from dungeon to dungeon. But in reality there are many possible options, you can visit the temples in 7 different orders. You need the Fairy Bow in the Water Temple and you need the Longshot (or Hover Boots) to enter the Spirit Temple. To enter the Shadow Temple you must complete the first three temples (the Kakariko well sequence gets triggered by collecting the first four Medaillons). So, this is how it looks (source):
Forest - Fire - Water - Spirit - Shadow
Forest - Fire - Water - Shadow - Spirit
Forest - Water - Fire - Spirit - Shadow
Forest - Water - Fire - Shadow - Spirit
Forest - Water - Spirit - Fire - Shadow
Fire - Forest - Water - Spirit - Shadow
Fire - Forest - Water - Shadow - Spirit
This only counts the temples, if you take the mandatory minidungeon Ice Cavern and Bottom of the Well into equation, you will end up with 55 possible orders, so Ocarina of Time scores a good 3rd place here. The Ice Cavern can be played at any point before the Water Temple and the Bottom of the Well at any point between the Forest and Shadow Temples.
And Master Quest might be somewhat different as well. Here you need the Fairy Bow in the Fire Temple, but not in the Water Temple, so you can beat the Water Temple first here. But it should be somewhat similar.