It is very difficult to ascribe two arbitray numbers here. It is like asking how many gallons of water you will need. Because we do not now what might happen nor for how long.
However, I think it would be prudent to have something like 1,000 rounds for any small to medium bore defensive rifles. If things get ugly these are going to be your primary and most capable. It is, still, an arbitrary number so you could say, 500. 750. Or 1,200. Or 2,000.
The lower the number, the higher the consequences might be later for wasted shots. But the same fire discipline should be exercized whether you have a 5-shot bolt action or a 30-round banana fed AR.
Ideally, assuming your guns have not been subject to heavy use already and have a long projected service life, I would multiply that by 5, maybe even 10. Since your barrels are probably going to run at least that long provided nothing else breaks that you can not fix. If things get ugly and stay that way for a prolonged period having all that ammo should carry you a long way, and if needed some can be bartered for unforeseen other needs that may arise.
Skimming I can see it has already been mentioned: the .22 rimfires. So here is the trick: buy a trunkload of .22 for rifle(s) and pistol(s). Preferably that which you know shoots well enough in each gun for each purpose. 2,000, 5,000 or 20,000. The more towards the latter, the longer the haul you will have some - and the more you can spare your heavier and more expensive ammo for your bigger guns.
Only a fool, even a small army of fools, will rush in to within even many hundreds of yards of open ground with limited cover to harass someone who can shoot with a .22 and a comparatively unlimited amount of ammo. In more urban terrain what the .22 lacks in power can be balanced with stealth and pinpoint accuracy. .22 should also be good potential barter stock.
For service pistols I would start with a basic 200, maybe 300 at the most. A defensive handgun is a stopgap arm. It is neither intended nor capable of replacing your main guns, nor the rimfires in their role. Spending more on this is going to detract from the heavy long guns and rimfires where you should invest the most in my view.
Pocket guns. 50 at the most.
Shotgun ammo is heavy, and lacks range. I would keep a few hundred for barricade defense and or birdhunting and thats it.
So if your budget is limted that is the way I would balance the load.