code: def count(keys, axis=semantics.axis_default):
      
      index = as_index(keys, axis, base=True)
      return index.unique, index.count
docs: count the number of times each key occurs in the input set
  
      Arguments
      ---------
      keys : indexable object
  
      Returns
      -------
      unique : ndarray, [groups, ...]
          unique keys
      count : ndarray, [groups], int
          the number of times each key occurs in the input set
  
      Notes
      -----
      Can be seen as numpy work-alike of collections.Counter
      Alternatively, as sparse equivalent of count_table