Returns the number of pages.
Call this function to retrieve the number of pages contained in the task pane.