Rework PDF page counting

This is a work in progress right now, follow up to #76 and #80.

pdftk can handle encryption algorithm 4, but it refuses to decrypt without
the owner password

I'm going to try again with pdfinfo from the poppler package.