def count(self, query=None, indices=None, doc_types=None, **query_params):
from .query import MatchAllQuery<EOL>if query is None:<EOL><INDENT>query = MatchAllQuery()<EOL><DEDENT>body = {"<STR_LIT>": query.serialize()}<EOL>path = self._make_path(indices, doc_types, "<STR_LIT>")<EOL>return self._send_request('<STR_LIT:GET>', path, body, params=query_params)<EOL>
Execute a query against one or more indices and get hits count.