There's no real limit! Except that numbers on computers have a limit (at least the type I use), so that would be it. But the game would behave weirdly and probably run way too slowly long before you reach that. I just tried stacking 10,000 buildings (not manually, I'm not crazy :P). That works fine, except that my browser doesn't want to save a screenshot then anymore.