I think the limitation is a total size in bytes. Each variable has an underlying xml cost in bytes. Additionally as the values are stored as text and not binary data, larger numbers (more decimal characters) and strings use more than short ones.
Thus....
You can have a few very long variables (like strings).
You can have many very small variables (like booleans).
You can store more data using fewer variables (due to underlying xml structure cost of each entry has).
You can store the most data by encrypting to strings (like WC3) due to higher base.
On top of that, the limit is a pool. Thus a 2 player map can use banks 6 times larger than a 12 player map.
If a bank is too big, the players who exceede the bank limite would freeze during map load.
This was the case during the beta of SC2. It may have changed since then but I have no heard any data to support that.