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.
Oof! The thought of not see everything from first to last pitch makes my skin crawl.
I went up to NY to get to Yankee Stadium and Citi Field a few years back and there was rain in the forecast. I was checking and calling the Mets all day long, we got all the way to Queens, and got off the train to find out it was postponed. Of course, my luck, they made it up the day I was supposed to be in the Bronx. We took off as soon as the last pitch was thrown and very very slowly made our way back to Queens, but didn't get in until about the 4th inning. I was fuming. I still count it, but I'll be going back at some point for good measure.
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.