If you are just counting ball parks then you were there for a game and got to see the park doesn't matter how long you actually spent at the game. If you are counting games then that is up to you what counts as a game.
In the end it's all about you and what you want to count.
My long time standard has been to stay at least until the game became "official" at 4.5 or 5 innings. This assumed I was there for the first pitch. My dad and I went to both Phils and Cubs games years ago where we sat for hours waiting out a rain delay, and which were both rained out without a single pitch being thrown. I didn't count either of those. Then dad and I went to a Tigers game on one of the most stifling nights I've ever experienced at a ballpark. We left after two innings, as my dad was in his eighties and might not have survived if we had hung around any longer. I counted that one. As Josh C. aptly points out, it's ultimately up to you what you want to count.
It's up to you. Personally, I want to say that I need to see an official game (5 innings), but I stretched that once. I only saw 4 in KC a couple of years ago before a 4 hour rain delay set in. We did not stick around as we had to drive home that night. I did count that one.
I count it if I've seen a game OR toured the ballpark. There have been some I've hit in the off season and I think doing a complete tour is seeing more of the park than if I'm just sitting in the stands. I've seen thousands of games, but not the intricacies of all the ballparks.