private void updateNodeCountMetrics(NodeList nodes) {
        var nodesByState = nodes.nodeType(NodeType.tenant)
                .asList().stream()
                .collect(Collectors.groupingBy(Node::state));

        var hostsByState = nodes.nodeType(NodeType.host)
                .asList().stream()
                .collect(Collectors.groupingBy(Node::state));

        // Count per state
        for (State state : State.values()) {
            var nodesInState = nodesByState.getOrDefault(state, List.of());
            var hostsInState = hostsByState.getOrDefault(state, List.of());
            metric.set("hostedVespa." + state.name() + "Nodes", nodesInState.size(), null);
            metric.set("hostedVespa." + state.name() + "Hosts", hostsInState.size(), null);
        }
    }
A version 6.163.20 will be returned as a number 163.020. The major
version can normally be inferred. As long as the micro version stays
below 1000 these numbers sort like Version.
node-repository/src/main/java/com/yahoo/vespa/hosted/provision/maintenance/MetricsReporter.java