'Count the selected elements in the query.
:param with_limit_and_skip (optional): take any :meth:`limit` or
:meth:`skip` that has been applied to this cursor into account when
getting the count'

def count(self, with_limit_and_skip=False):

    if (((self._limit == 0) and with_limit_and_skip) or self._none):
        return 0
    return self._cursor.count(with_limit_and_skip=with_limit_and_skip)
