public int eventuallyUnusedIpAddressCount(Node host) {
        // The count in this method relies on the size of the IP address pool if that's non-empty,
        // otherwise fall back to the address/hostname pool.
        if (host.ipConfig().pool().ips().isEmpty()) {
            Set<String> allHostnames = cache().keySet();
            return (int) host.ipConfig().pool().hostnames().stream()
                             .filter(hostname -> !allHostnames.contains(hostname.value()))
                             .count();
        }
        Set<String> allIps = ipCache.updateAndGet(old ->
            old != null ? old : stream().flatMap(node -> node.ipConfig().primary().stream())
                                        .collect(Collectors.toUnmodifiableSet())
        );
        return (int) host.ipConfig().pool().ips().stream()
                         .filter(address -> !allIps.contains(address))
                         .count();
    }
Returns the number of unused IP addresses in the pool, assuming any and all unaccounted for hostnames
in the pool are resolved to exactly 1 IP address (or 2 if dual-stack).
node-repository/src/main/java/com/yahoo/vespa/hosted/provision/NodeList.java