synchronized int getRegionCount() {
    int regionCount = 0;
    for (Entry<TableName, AtomicInteger> entry : this.tableAndRegionInfo.entrySet()) {
      regionCount = regionCount + entry.getValue().get();
    }
    return regionCount;
  }
Gets the total number of regions in namespace.
@return the region count
hbase-server/src/main/java/org/apache/hadoop/hbase/namespace/NamespaceTableAndRegionInfo.java