synchronized void addTable(TableName tableName, int regionCount) {
    if (!name.equalsIgnoreCase(tableName.getNamespaceAsString())) {
      throw new IllegalStateException(
        "Table : " + tableName + " does not belong to namespace " + name);
    }
    if (!tableAndRegionInfo.containsKey(tableName)) {
      tableAndRegionInfo.put(tableName, new AtomicInteger(regionCount));
    } else {
      throw new IllegalStateException("Table already in the cache " + tableName);
    }
  }
Gets the total number of regions in namespace.
@return the region count
hbase-server/src/main/java/org/apache/hadoop/hbase/namespace/NamespaceTableAndRegionInfo.java