Since you just have to read all the file to get the
Count tags, and the parent node has got one too, the following php script should work.
It looks for the largest
Count tag, that is the one from the parent node. Just save it as
test.php and call it with test.php?file=my_pdf_file.pdf