5+, more if hard-to-find...
I like to have at least five for each pistol, although for any model I own that's been discontinued, I'm always keeping an eye open for bargains. As an earlier poster said, I'm not too worried about being able to find certain magazines -- 1911 magazines, for example -- so my "radar" isn't up for those all the time.
As for rifles, on the other hand, for any models that I own that might someday be restricted by the gov't, I try to keep more magazines handy. I had about thirty FAL magazines, for example, before they were all lost in a tragic boating accident a while back.