@classmethod<EOL><INDENT>def count(cls, filter=None, **kwargs):<DEDENT>
from mongoframes.queries import Condition, Group, to_refs<EOL>if isinstance(filter, (Condition, Group)):<EOL><INDENT>filter = filter.to_dict()<EOL><DEDENT>return cls.get_collection().count(to_refs(filter), **kwargs)<EOL>
Return a count of documents matching the filter