code: function () {
          var records = this.get('totalRecords'),
              perPage = this.get('rowsPerPage');
  
          // rowsPerPage not set.  Can't calculate
          if (!perPage) {
              return null;
          }
  
          if (records === Paginator.VALUE_UNLIMITED) {
              return Paginator.VALUE_UNLIMITED;
          }
  
          return Math.ceil(records/perPage);
      }
docs: Get the total number of pages in the data set according to the current
  rowsPerPage and totalRecords values.  If totalRecords is not set, or
  set to YAHOO.widget.Paginator.VALUE_UNLIMITED, returns
  YAHOO.widget.Paginator.VALUE_UNLIMITED.
  @method getTotalPages
  @return {number}