def count(self, with_limit_and_skip=False):
        """Get the size of the results set for this query.

        Returns the number of documents in the results set for this query. Does
        not take :meth:`limit` and :meth:`skip` into account by default - set
        `with_limit_and_skip` to ``True`` if that is the desired behavior.
        Raises :class:`~pymongo.errors.OperationFailure` on a database error.

        With :class:`~pymongo.mongo_replica_set_client.MongoReplicaSetClient`
        or :class:`~pymongo.master_slave_connection.MasterSlaveConnection`,
        if `read_preference` is not
        :attr:`pymongo.read_preferences.ReadPreference.PRIMARY` or
        :attr:`pymongo.read_preferences.ReadPreference.PRIMARY_PREFERRED`, or
        (deprecated) `slave_okay` is `True`, the count command will be sent to
        a secondary or slave.

        :Parameters:
          - `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

        .. note:: The `with_limit_and_skip` parameter requires server
           version **>= 1.1.4-**

        .. note:: ``count`` ignores ``network_timeout``. For example, the
          timeout is ignored in the following code::

            collection.find({}, network_timeout=1).count()

        .. versionadded:: 1.1.1
           The `with_limit_and_skip` parameter.
           :meth:`~pymongo.cursor.Cursor.__len__` was deprecated in favor of
           calling :meth:`count` with `with_limit_and_skip` set to ``True``.
        """
        if not isinstance(with_limit_and_skip, bool):
            raise TypeError("with_limit_and_skip must be an instance of bool")
        command = {"query": self.__spec, "fields": self.__fields}

        command['read_preference'] = self.__read_preference
        command['tag_sets'] = self.__tag_sets
        command['secondary_acceptable_latency_ms'] = (
            self.__secondary_acceptable_latency_ms)
        command['slave_okay'] = self.__slave_okay
        use_master = not self.__slave_okay and not self.__read_preference
        command['_use_master'] = use_master
        if self.__max_time_ms != None:
            command["maxTimeMS"] = self.__max_time_ms
        if self.__comment:
            command['$comment'] = self.__comment

        if with_limit_and_skip:
            if self.__limit:
                command["limit"] = self.__limit
            if self.__skip:
                command["skip"] = self.__skip

        database = self.__collection.database
        r = database.command("count", self.__collection.name,
                             allowable_errors=["ns missing"],
                             uuid_subtype=self.__uuid_subtype,
                             compile_re=self.__compile_re,
                             **command)
        if r.get("errmsg", "") == "ns missing":
            return 0
        return int(r["n"])
dataset/ETHPy150Open blynch/CloudMemeBackend/pymongo/cursor.py/Cursor.count/operator `is not` -> `!=`