Counts how many pages are in a pdf