code: def count(self, index=None, doc_type=None, body=None, **query_params):
          
          if doc_type and not index:
              index = EsConst.ALL_VALUES
  
          path = self._es_parser.make_path(index, doc_type, EsMethods.COUNT)
          result = yield self._perform_request(HttpMethod.GET, path, body, params=query_params)
          returnValue(result)
docs: Execute a query and get the number of matches for that query.
          `<http://www.elastic.co/guide/en/elasticsearch/reference/current/search-count.html>`_
          :param index: A comma-separated list of indices to restrict the results
          :param doc_type: A comma-separated list of types to restrict the results
          :param body: A query to restrict the results specified with the Query DSL
              (optional)
          :arg allow_no_indices: Whether to ignore if a wildcard indices
              expression resolves into no concrete indices. (This includes `_all`
              string or when no indices have been specified)
          :arg analyze_wildcard: Specify whether wildcard and prefix queries
              should be analyzed (default: false)
          :arg analyzer: The analyzer to use for the query string
          :arg default_operator: The default operator for query string query (AND
              or OR), default 'OR', valid choices are: 'AND', 'OR'
          :arg df: The field to use as default where no field prefix is given in
              the query string
          :arg expand_wildcards: Whether to expand wildcard expression to concrete
              indices that are open, closed or both., default 'open', valid
              choices are: 'open', 'closed', 'none', 'all'
          :arg ignore_unavailable: Whether specified concrete indices should be
              ignored when unavailable (missing or closed)
          :arg lenient: Specify whether format-based query failures (such as
              providing text to a numeric field) should be ignored
          :arg lowercase_expanded_terms: Specify whether query terms should be
              lowercased
          :arg min_score: Include only documents with a specific `_score` value in
              the result
          :arg preference: Specify the node or shard the operation should be
              performed on (default: random)
          :arg q: Query in the Lucene query string syntax
          :arg routing: Specific routing value