def category_count(self):
        """Returns the number of categories in `categories`."""
        category_dict = self.categories
        count_dict = {category: len(
            category_dict[category]) for category in category_dict}
        return count_dict