How Many Flags can a Game Actually Have ?

How Many Flags can a Game Actually Have ?

I have over 500 flags in my Sci Fi game so far (the 2d version), but I'm not sure if I can do the same thng in the 3d version  and I neeed to put 60 of those flags is just in one loot area to scatter all the loot around in the Great Ruins area on one of the planets.  Now my game has got many systems and worlds in it, so this could take over 500 more flags just to put in all the loot collectible areas for this type of game. I could even be looking at over 1,000 flags and up to 100k for the save game just to save the list of flags.

So I've got doubts whether I can have this many flags counters also running in the 3d version, as I don't know if a 3d engine can beable to handle this many flag counters.  But the 2d script version can handle all hese flags, I need a huge amount of flag counters to do this kind of multi system game.....