Added a method that returns the category count