code: def count(self, query):
          
          body = {
              "query": {
                  "bool": {
                      "must": [{
                          "query_string": {
                              "query": query,
                          }
                      }]
                  }
              }
          }
  
          body['query']['bool']['must'].append(self._get_timestamp_filer())
  
          return self._es.count(index=self._index, body=body).get('count')
docs: Returns number of matching entries
  
          :type query str
          :rtype: int