code: def rowCount(self, index=None):
          
          if self.axis == 0:
              return max(1, self._shape[0])
          else:
              if self.total_rows <= self.rows_loaded:
                  return self.total_rows
              else:
                  return self.rows_loaded
docs: Get number of rows in the header.