I would consider one (for each) to be the absolute acceptable minimum.
Two is better. More than that, it becomes a matter of how you plan to use the gun. More magazines than you can physically carry at one time seem a bit excessive to me, but unless the kids go hungry and your bills unpaid, excess in that direction isn't a sin, just a matter or personal taste.
Having lots of spare mags has advantages, because they do eventually wear out, can be damaged, and are sometimes even lost. Also some people prefer to load lots of magazines before they go to the range or afield. And then there is also the "Last Man Standing" pleasure in having a lot of loaded mags available.
one of my rifles (FAL) has 1 mag, and 10 spares (20rnd). My Mini 14 has over a dozen, from 5rnd to 90rnd. My BLR has 3 mags, quite enough for the kind of rifle and shooting I do with it.
Couple dozen mags for 1911s...
about 10 for my 10/22 (10 & 25rnds)
Before the anti's got on the "limit the # of rounds" kick, it was never a big deal. Today? Figure out what your needed minimum is, add 25% (rounded up to the next whole magazine
), and buy them, while you still legally can.