Changed the getCategoryCount database type from write to read