merged subclass count into get_class_count