It's difficult to give a concrete, sourced answer to this without knowing which country we're talking about.
However, in most cases, I wouldn't worry about it if I was you, as long as your main intention is tourism. If you're very keen on being careful, you could contact the embassy of whatever country you're going to visit. But this has the very real danger of complicating the visa application process when the time comes. Maybe ask them after you've returned? (Thanks @TomAu)
The situation might change a little if you become known as someone selling photographs on the side (For example, if you have a website, etc.) This still seems very unlikely, though, but some countries will demand that all persons who are known to work in related professions visit on a journalist visa, regardless what they claim any given trip is for. For example, two years ago my mother, who works in publishing, wanted to visit India, purely as a tourist. The Indian Embassy demanded that, due to her profession, she did so on a journalist visa, regardless of her stated intentions for the trip.
Now, since you probably aren't working in media, even this wouldn't apply to you. But if you got into the habit of selling photographs, had a website, or were otherwise known as someone making money from photography, it's not impossible (though still very unlikely) that it could happen.
Mostly though, if the main intention of your trip is tourism, most countries won't mind, let alone notice, if you happen to end up selling some of the photos you took as a tourist. I find it extremely unlikely that any government is gonna track down an amateur photographer after a trip and say "Hey, what kind of visa were you on when you took that photo?" And even if it did happen, it's such a gray area that you'd be unlikely to get anything worse than a warning.