private int groupCount() {
        if ( ! nodes.isEmpty()) return (int)nodes.not().retired().stream().mapToInt(node -> node.allocation().get().membership().cluster().group().get().index()).distinct().count();
        return cluster.minResources().groups();
    }
The number of groups this cluster has, or will have if not deployed yet.
node-repository/src/main/java/com/yahoo/vespa/hosted/provision/autoscale/ClusterModel.java