@classmethod
def count(cls, context, validate_filters=True, **kwargs):
    """Count the number of objects matching filtering criteria."""
    return len(cls.get_objects(context, validate_filters=validate_filters,
        **kwargs))
