synchronized int getRegionCountOfTable(TableName tableName) {
    if (tableAndRegionInfo.containsKey(tableName)) {
      return this.tableAndRegionInfo.get(tableName).get();
    } else {
      return -1;
    }
  }
Gets the total number of regions in namespace.
@return the region count
hbase-server/src/main/java/org/apache/hadoop/hbase/namespace/NamespaceTableAndRegionInfo.java