As a rule of thumb, you should have enough ammo so that you end up with one more round than your enemy. LOLLL
Seriously (if you can afford it), 10,000-50,000 rds. of ammo for guns that you shoot a LOT (e.g. a .22);
5,000-10,000 rds. for guns that you like to shoot, but don't get the chance to shoot as often as the .22s (e.g. your 9mms or .40s).
100-200 rds. each for guns that are old relics, but could be used in a dire emergency (e.g. an old Krag, or an 1886 Lebel).
Heck, I even have 40 rds. for my old Vetterli-Vitali 10.4mm rifle.
Of course, if you have Class III stuff, all bets are off...