I've been wanting to write a query to cough up a bunch of neat stats about a user. One of them is the ratio of helpful flags to declined and disputed flags. However, I can't find where I can get these counts. All I can see is the pending flags. Is there a way to either get the flags themselves (so I can count them) or the counts directly?
No, there is not.
Raised flags are private to the user and only accessible by/for mods. There was a time your flag stats were shown when you decided to run for moderator bit that is now also gone.
I always assume good faith so I don't expect you to go hunt down or do a public bashing of users with lower than average ratio's. However previous rates were abused a bit and I can see that side here as well.
Just for completeness I checked if the Stack API would return it. You'll find the earlier mentioned accept_rate. For flags there is no info, details nor counts.