My standard has been whether I actually went through immigration and customs. I have passed through Panama many times, for instance, but have never left the airport, so I wouldn't count that (in fact, I've never bothered to count the countries I've visited, though I could do so - in South America, it's easy, because Venezuela is the only one I've missed).