I am trying to write a code to count how many times each category is named and then take the mean of each category. How would I go about this? A for loop? a if else ? a fu