I'm not sure on the exact number, but the limit stops you from even going into a map. The game crashes because of too many in the base folder, not ones spawned ingame. That would depend on your PC's specs probably.
One of my favorite things to do in JA SP is to have big battles with NPC's from the Star Wars movies, but I can't have every variation of every character and then some due to this limit.
The limit isn't based around an exact number of .npc files or whatever, it's based on how many characters are in the .npc files (I think that limit is like 80k characters? I dunno.)