Not never, no. That's not a great idea. At least not if you want to, but decide not to because you have been told that it is wrong. Let's get this out of the way first, it is not bad to masturbate.
It might be worthwhile to repeat this so, it is not wrong to masturbate.
No, not wrong.
So, given that zero frequency is not the right answer, what is?
Well, there is a masturbation frequency that will mean that you cannot play a worthwhile role in life around you. This role may include studies, work, meeting friends and family, turning up for social events, and say, turning up on time for scheduled engagements like meetings, classes, or office.
It is all a bit subjective, yes, but the quest for a number answer is flawed. If you find that you are missing things that constitute a meaningful life such as those described above, because you are masturbating, then yes, you are masturbating too much.
Another telling indicator is if you are masturbating in public places such as while on the road, at a mall or at office. If you find that in places such as these you are masturbating–say, at a public restroom–regularly then you are masturbating too much. Or if you are masturbating even more publicly, let's say sneakily, without going into a restroom, then you are definitely masturbating too much.
As you can see, the red flags are for really 'out there' frequencies and masturbation occasions. That mostly means that in and of itself, masturbation is not a bad thing. Worry about it only if it is getting in the way of life.
We can't give you an ideal frequency, for there is no single ideal frequency that is universally applicable, but we hope that this way of looking at it helps you figure out what the ideal frequency for you should be.