Many hours have I searched for a fast and easy, but mostly a
You can use qpdf like below. If a file file_name.pdf has 100 pages,
qpdf
$ qpdf --show-npages file_name.pdf 100