count function

Count observations by group