Depends on the situation. Can I/we retreat? What are the surroundings? Are they doing "spray and pray", or taking well-aimed, well-timed shots? Do I have a Glock 19 with a standard mag or a S&W 5-shot .32? Do I have a Rem 870 or a Rem 700?
Every situation is different. What if it's 10 bad guys instead of 3? My answer will vary. In actual experience, merely brandishing my shotgun behind a screen door was enough to scare off an unknown number of intruders at my mother's farm late one night. Had I been fired upon, I would have retreated to a more defensible position and waited for them to act. No hope for police, as the nearest cop would have been anywhere from 10 to 60 minutes away. I would do the best I could with the tools I had. Wishing for something more won't make a difference.
What if the 1st shot from one of those bad guys hits the receiver and jams your AR? Magazine size won't matter to you then...
Nope, you/yours are trapped. No other variables. Someone is going to die. Would you want less capacity than them or more? If they had 10, 20 or 30. Would you be content with 5 or 10?