Source code demonstrating how to pro-grammatically count the number of total pages in a PDF file. This code does not rely on using Adobe Acrobat or any other object library, it uses only Visual Basic code by opening the PDF file in binary mode with the Open statement and reading bytes.