setTotalPages

Sets the total number of pages. This method should be called after setting up items.