I usually work towards having 10 for mine and the most heavily used ones the more the merrier, but i do have a few that i only have a few for just cause i dont use them much and the mags aint easily found and when you do they are high.
I try to have 3-4 minimum for things like my P365 EDC, 6+ for crossovers like my P229 and 10+ for SHTF/TEOTWAWKI gear like my P226. The 226 mags work in the 229 so I figure it makes sense to have more of those. I leave a spare P226 mag in my nightstand/gunvault and a couple in the truck so I can take my P229 or P226 and still be covered. Other than "lots" I don't know the correct answer.
I've always said that I'd rather have too many than not enough.
However, if you feel like you need 8 or 10 mags, holding 15 rounds or so, you need to change two things in your life...
1. Stay away from places you shouldn't be.
2. Get more training and more practice.
If you can't get yourself out of a situation with 15-30 rounds, what makes you think another 20-30 is gonna help?
Well, you might have gotten out of the situation with 15-30 rounds but you might have had to leave a magazine or two in an area where they can't be retreived. If you can't replace them you are now down to 15 rounds the next time......might be a good idea to have plenty of spares.