def get_number_docs(index_name, es):
    """ Return the number of indexed documents in ElasticSearch

    :param index_name: ElasticSearch index file
    :param es: ElasticSearch object
    :return: int
    """
    res = es.count(index=index_name)
    return res['count']