'Count the number of objects matching filtering criteria.
:param context:
:param validate_filters: Raises an error in case of passing an unknown
filter
:param kwargs: multiple keys defined by key=value pairs
:return: number of matching objects'

@classmethod
def count(cls, context, validate_filters=True, **kwargs):

    if validate_filters:
        cls.validate_filters(**kwargs)
    return obj_db_api.count(context, cls.db_model, **cls.modify_fields_to_db(kwargs))
