comments: total number of pages addition

* Adds function for determining the total number of pages for PDF records.

Signed-off-by: Adrian-Tudor Panescu <adrian.tudor.panescu@cern.ch>