how many global variables can you get away with?
ArmA < 1.09: 240, IIRC
Arma >= 1.09...who knows. If it's really fixed, then "a high number".
Meanwhile, a possible solution to get around GV namespace pollution and overpopulation: use
setVariable and
getVariable on an object of your choosing (perhaps a game logic):
Example:
// init.sqf
// Create a GL to use for variable storage
KLS_MyVars = "Logic" createVehicleLocal [0,0,0];
// Create two utility functions
KLS_fSet = { KLS_MyVars setVariable _this };
KLS_fGet = { KLS_MyVars getVariable _this };
Then, use the utility functions like this:
["count",3] call KLS_fSet;
...
...
_count = "count" call KLS_fGet;
hint format ["Count is currently %1",_count];
Yes, it's cumbersome.