Counting for Categorical Data