Acrobat SDK also talks about how to automate Reader.
If you just search for /Count, you will get back a LOT of incorrect information. First, that same name is used in a LOT of different places in the PDF – not just for the page count – and in fact, in most PDFs that number will be for each part not necessarily all of them. Second, if the PDF has been modified, there can be multiple versions of that string.
You need to use a PDF parser to properly find the things you need.