default int getRegionCount() {
    return getLiveServerMetrics().entrySet().stream()
      .mapToInt(v -> v.getValue().getRegionMetrics().size()).sum();
  }
Returns the number of regions deployed on the cluster
hbase-client/src/main/java/org/apache/hadoop/hbase/ClusterMetrics.java