code: def count(self, metric_name='count'):
          
          metric = self.table.count().name(metric_name)
          return self.table.aggregate([metric], by=self.by, having=self._having)
docs: Convenience function for computing the group sizes (number of rows per
          group) given a grouped table.
  
          Parameters
          ----------
          metric_name : string, default 'count'
            Name to use for the row count metric
  
          Returns
          -------
          aggregated : TableExpr
            The aggregated table