im not an expert, but im pretty sure this is hard coded.
As you probably know it only stops you building things from barracks etc. No limit on trigger-created objects as far as i know, until the game crashes Its also possible to get infinate villagers and soldiers by setting up 'slave' computer players who pass their units on to you using triggers. The slave players never reach maximum, so they can keep pumping out units. Some interesting possibilities with that, but it can be complicated to set up withthe right a.i and triggers. Also, obviously, the human player cant actually build any units themselves once they are over 200.