I just said what I said and it was wrong
Or was taken wrong

Sometimes things just work out. If Google hadn’t decided to pull the plug on Feedburner, Marco Arment wouldn’t have written his clever subscriber counting shell script, and I’d have been forced to write one of my own. But by putting off writing my own script, I saved myself a lot of time; all I had to to was change a few lines of Marco’s.

I’ve always used Google Reader’s statistics as a rough guide to how many subscribers I have. I know there are people who use other services, but I figured Reader, because it acts as the server for so many readers, would account for the lion’s share of subscribers.

But since I started using PubSubHubbub a couple of weeks ago, the subscriber count returned by Reader has been stuck on 2,733. It’s not that I was expecting a big jump, but that count has always fluctuated. I downloaded my access log file and did a little searching. Here are some of the entries I found:

Not only was the log file showing a few more subscribers for that particular feed ID, there were, for reasons I cannot fathom, other feed IDs associated with the same feed URL. Obviously, the right way to get the subscriber count was to search for all lines like this and add up the values.

As it seemed like a simple enough problem, I did a little Googling to see if someone had done it before. I found Ken Varnum’s blog post on the subject and the web page he made for doing the calculation. I didn’t want to provide access to my stats to an unknown host (no disrespect to Ken meant, just a general principle), so I figured I’d have to do it myself.

Then along came Marco’s gist. His script, like Ken’s, did more than just count Google Reader subscribers, I could run it on my own server, and I could review and change the source code to my heart’s content. A perfect solution.