code: def count(self, axis='major'):
          
          i = self._get_axis_number(axis)
  
          values = self.values
          mask = np.isfinite(values)
          result = mask.sum(axis=i, dtype='int64')
  
          return self._wrap_result(result, axis)
docs: Return number of observations over requested axis.
  
          Parameters
          ----------
          axis : {'items', 'major', 'minor'} or {0, 1, 2}
  
          Returns
          -------
          count : DataFrame