def METHOD_NAME(ini_config, section):
    if not ini_config.has_section(section):
        ini_config.add_section(section)
        return 0
    index = 0
    while True:
        proxy_index_str = "proxy." + str(index)
        if proxy_index_str in ini_config[section]:
            index += 1
            continue
        return index