This demo shows you how to get the page count of a PDF document.