count function

Get counts of the number of records per index.