As other posters have noted, the answer varies from person to person. There is, however, some knowledge from education research (much of it conducted specifically in mathematics) that you might find helpful.
One key insight is that the number of problems isn't usually as important as the timing or spacing of your practice. Once you've "worked to criterion", i.e., once you've figured out what you're supposed to figure out, working a bunch more of the same type of problems in the same session probably won't do much for your retention. The ability to remember information depends more on whether your brain has ever had to work to remember it. Your brain doesn't really have to work to remember what to do in problem 25 when 1-24 were the same idea, and so the massed practice doesn't really impact retention as much as you would think.
What will help, however, is going back and working more problems after enough time has passed that you have almost, but not quite, forgotten the ideas. When your brain has to work a bit to remember something, it strengthens the retrieval pathways in response, so your brain will be better able to dig that information out of your brain on command in the future. Thus, working five problems the week you learn something, five more the next week, and five more the week after that will probably help you more than working all fifteen or even more problems all in one block.
So how many do you need? Only you will really know, but if you space them out strategically, it shouldn't be as many as you might otherwise.