Implemented counting points for categories