compute_tabulate function

Count data at each location of a categorical variable