private int getCountOfCommonTableRegions() {
    RegionServerServices rss = region.getRegionServerServices();
    // Can be null in tests
    if (rss == null) {
      return 0;
    }
    TableName tablename = region.getTableDescriptor().getTableName();
    int tableRegionsCount = 0;
    try {
      List<? extends Region> hri = rss.getRegions(tablename);
      if (hri != null && !hri.isEmpty()) {
        tableRegionsCount = (int) hri.stream()
          .filter(r -> r.getRegionInfo().getReplicaId() == RegionInfo.DEFAULT_REPLICA_ID).count();
      }
    } catch (IOException e) {
      LOG.debug("Failed getOnlineRegions " + tablename, e);
    }
    return tableRegionsCount;
  }
Returns Count of regions on this server that share the table this.region belongs to
hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/IncreasingToUpperBoundRegionSplitPolicy.java