code: public int getPageCount() {
          if(_dataSetSize != null)
              return (int)Math.ceil(_dataSetSize.doubleValue()/(double)getPageSize());
          else throw new IllegalStateException(Bundle.getErrorString("PagerModel_CantCalculateLastPage"));
      }
docs: Get the total number of pages.  This value is useful when displaying the total number of pages in UI like:
  <pre>
  Page 4 of 10
  </pre>
  This method returns an absolute count of the number of pages which could be displayed given the
  size of the data set and the current page size.  This method requires the PagerModel know the
  total size of the data set.
  @return the number of pages
  @throws  IllegalStateException when the size of the data set has not been set