count items of a category