def count(self, with_limit_and_skip=False):
        if with_limit_and_skip is False:
            return super(QuerySet, self).count(with_limit_and_skip)

        if self._len is None:
            self._len = super(QuerySet, self).count(with_limit_and_skip)

        return self._len
Count the selected elements in the query.
dataset/ETHPy150Open MongoEngine/mongoengine/mongoengine/queryset/queryset.py/QuerySet.count