def count(self):
    '\n        Return the number of hits matching the query and filters. Note that\n        only the actual number is returned.\n        '
    if (hasattr(self, '_response') and (self._response.hits.total.relation == 'eq')):
        return self._response.hits.total.value
    es = get_connection(self._using)
    d = self.to_dict(count=True)
    return es.count(index=self._index, body=d, **self._params)['count']
Return the number of hits matching the query and filters. Note that
only the actual number is returned.
def count(self):
    '\n        Return the number of hits matching the query and filters. Note that\n        only the actual number is returned.\n        '
    if (hasattr(self, '_response') and (self._response.hits.total.relation == 'eq')):
        return self._response.hits.total.value
    es = get_connection(self._using)
    d = self.to_dict(count=True)
    return es.count(index=self._index, body=d, **self._params)['count']