refactored category list and count, didnt need to use group_by in this instance