According to the ATP world tour ranking FAQ (i.e. for men's tennis), a player's world ranking is calculated from:
- The four Grand Slams
- The eight World Masters 1000 tournaments
- The ATP World Tour finals
- The player's best six results from other ranking tournaments.
If a player fails to qualify for a Grand Slam or Masters, he can count an additional other tournament. But if he qualifies and does not participate, the Grand Slam/Masters result is the one that counts.
So that means that a player has to take part in 18-19 tournaments so as not to actively lose out on ranking points - but the more the better (since more tournaments means you discard poor results).
For women's tennis, Wikipedia suggests that it's the best 16 points scores from ranking tournaments, including:
- the 4 Grand Slams
- the 4 Premier Mandatory tournaments
- the WTA Finals
I'd imagine the same or similar rules apply to in the men's case for players who do not qualify for Grand Slams, WTA Finals and Premier Mandatory tournaments.