code: def count(
      self,
      index=None,
      doc_type=None,
      query=None,
      params=None,
      headers=None,
  ):
      searchable_indexes = self._normalize_index_to_list(
          index, query=query
      )
      searchable_doc_types = self._normalize_doc_type_to_list(doc_type)
      i = 0
      for searchable_index in searchable_indexes:
          for document in self.__documents_dict[searchable_index]:
              if (
                  not searchable_doc_types
                  or document.get("_type") in searchable_doc_types
              ):
                  i += 1
      result = {
          "count": i,
          "_shards": {"successful": 1, "failed": 0, "total": 1},
      }
  
      return result
  
imports: from __future__ import annotations
  import fnmatch
  import json
  from elasticsearch import Elasticsearch
  from elasticsearch.exceptions import NotFoundError
  from .utilities import MissingIndexException, get_random_id, query_params
label_desc: Use image node_id 10 for calling the FakeElasticsearch obj's underlying member method code with example usage: obj.count(index, doc_type, query, params, headers) and returns: result