Auto-translated
Kird, 317 thousand is possible. I think it might even be 999999 in each cell, i.e., a total of 7 million, although there's no way to gather such a large army. But you need to be careful; once, the counter glitched, resulting in a negative number of units with a minus sign when sorting them equally into each cell. And the money counter also glitched after 1 billion gold.