The actual firing of a firearm by a civilian in self defense happens very infrequently. To base one's risk assessment on variations of what has actually happened in very rare events is really not a preferred method.
Rather, one would be better served by simulation and role playing, or by pure analysis such as failure mode and effect analysis (that's a structured way of analyzing "what ifs"), coupled with some realistic training.
The questions I would ask are three: (1) do I need to worry about only a single attacker, or two or maybe even three (personally, I don't think one guy is likely to take me on, except maybe from behind); (2) how many hits on each will be sufficient to stop them (two plus, probably); and (3) if things unfold in the blink of an eye, and they are moving very fast and not in a straight line, how many shots will it take to get those hits? Add to that that I do not really want to be left with an empty gun....
On television, there's always time for the hero to get his gun ready and aim carefully--how else could you appreciate the danger? The assailant is always standing still--all the better for the dramatic effect. One shot always stops the action instantly.
Of course, if you do have a lot of time, are you really in imminent danger; why on earth would anyone expect an attacker to present himself as a stationary target, and how would he endanger you by so doing; and is it at all realistic to expect that one shot to save your life if an attacker can continue his evil doing for ten seconds after a shot in the heart? I think we should forget what we've "learned" from television.
Todays tactical training is, I think, much more realistic: A couple of very rapid shots on each of two or three short range targets, maybe fired while running. In a course I took recently, the drill involved two shots on each of three torso targets at seven yards, followed by a reload and by two more shots at each of the thee targets. Elapsed time for the skilled participants was just over four seconds for twelve hits. Eye opening, thought provoking, and worth while, I think.
How big a magazine? I don't know. Personally , I don't think I need to carry 19 or 17+1, but I have come to appreciate that one should probably have more than 5 shots....even though he or she is most unlikely to ever shoot even one shot in self defense.