Return a cursor on a filtered list of documents in a collection.

        :param offset: for pagination, which record to start attribute
        :param limit: for pagination, how many records to return
        :param fields: list of field names to return (otherwise returns all)
        :param sort: list of fields to sort by (prefix with '-' for descending)
        :param kwargs: key/values to find (only supports equality for now)

        :returns: a tuple of a cursor on documents and the total count

        Note: close the cursor after using it if you don't exhaust it

def _cursor(self, offset=0, limit=0, fields=None, sort=None, **kwargs):
        """Return a cursor on a filtered list of documents in a collection.

        :param offset: for pagination, which record to start attribute
        :param limit: for pagination, how many records to return
        :param fields: list of field names to return (otherwise returns all)
        :param sort: list of fields to sort by (prefix with '-' for descending)
        :param kwargs: key/values to find (only supports equality for now)

        :returns: a tuple of a cursor on documents and the total count

        Note: close the cursor after using it if you don't exhaust it
        """
        projection = {'_id': False}
        if fields:
            projection.update({field: True for field in fields})
        results = self._collection.find(kwargs, projection)
        if sort:
            sort_pairs = sort[:]
            for index, field in enumerate(sort):
                if field[0] == "-":
                    sort_pairs[index] = (field[1:], pymongo.DESCENDING)
                else:
                    sort_pairs[index] = (field, pymongo.ASCENDING)
            results.sort(sort_pairs)
        results.skip(offset or 0).limit(limit or 0)
        return results