code: public void calculatePages(int pageIndex, int matchesPerPage) {
  
          m_pageIndex = pageIndex;
          // calculate the number of pages for this search result
          m_pageCount = m_hitCount / matchesPerPage;
          if ((m_hitCount % matchesPerPage) != 0) {
              m_pageCount++;
          }
      }
docs: Calculates the result pages.<p>
  
  @param pageIndex the index of the current page
  @param matchesPerPage the matches per page