I do not understand what you want.
It sounds like you want to count and take the mean of the counts.
But you don't need to do that as the mean of the counts is just the total number of observations divided by the number of distinct values.
For example if you had GENDER coded as M and F there are two gender categories. So the mean of the count of people per category is N/2.
What do intend to DO with this mean? What value would a SD add?