I really think it's as much as the game can hold without getting glitchy. Or as much as it needs, i.e. in a recent career challenge, players have been complaining about various glitches and bugs, which were (most likely) results of over-population. Careers require co-workers, the game keeps either making existing Sims become co-workers or creates new ones, thus over-populating the town. Sunset Valley has nearly 150 Sims in it altogether. In my opinion, the game can hold double of that, maybe even more - near 500 Sims - in one town. But, to be honest, I doubt anyone will ever reach that mark when playing a normal Dynasty game/small family/one Sim household. Sure, huge Legacies have been known to cause such problems.