getCounts function

Aggregate person-month data into counts and totals by groups.