def get_number_of_networks_with_dhcp(agents):
    """Get overall number of networks handled by at least one dhcp agent

    :param: dict with agents and networks handled by thoses agents

    :return: number of unique networks hosted on dhcp agents
    """

    networks = []
    for agent_networks in agents.values():
        networks += agent_networks
    return len(set(networks))