This is all proportional to the potential threat and carry/storage issues, and there are no hard thresholds. Regarding caliber, .22 LR is a good minimum because it penetrates just enough most of the time, and the vast majority of people can shoot it quickly and accurately enough with a minimal amount of practice. .32 ACP with FMJ bullets can penetrate all the way through most human torsos, and is therefore another good minimum for that particular reason. Larger calibers offer greater margin at the cost of controllability for some folks, and capacity in some cases. For me personally, .32 ACP is the minimum recommended caliber for self-defense, although I currently use .40 S&W because I can.
As for capacity, much depends on logistics such as the mode of carry, but as far as recommendations go, you'll most likely need "several" (say, maybe 5 at minimum?) rounds per assailant, in my opinion, because while one bullet can be enough to kill, eventually, stopping a determined attacker RIGHT NOW usually takes a lot more than that. In home invasion and business robbery scenarios, for example, the perpetrators often attack in groups of 2-4, usually with 1-2 of them actually inside, and the others as backups, lookouts, and getaway car drivers outside. The state of California, in all its benevolent wisdom
, has decided that all I need is 10+1 rounds in my M&P40 at any given time, so that's what I keep handy along with a spare magazine, giving me a grand total of 21 rounds. Pointless legal restrictions aside, that half-pound of lead should be enough to take care of the whole gang if it comes to that, which it usually won't. I could probably get away with 10+1 rounds in most real-life scenarios, but why risk running low on ammo after putting down a perp or two? Some people just won't stay down when told and may need additional persuasion. I may not need to fire even a single round in most cases, if I'm lucky enough, but at the same time it's not overly burdensome to prepare for the worst case that I could expect (within reason).