public int getRegionCountOfTable(TableName tName) throws IOException {
    if (stateManager.isInitialized()) {
      NamespaceTableAndRegionInfo state = stateManager.getState(tName.getNamespaceAsString());
      return state != null ? state.getRegionCountOfTable(tName) : -1;
    }
    checkTableTypeAndThrowException(tName);
    return -1;
  }
Get region count for table
@param tName - table name
@return cached region count, or -1 if table status not found
@throws IOException Signals that the namespace auditor has not been initialized
hbase-server/src/main/java/org/apache/hadoop/hbase/namespace/NamespaceAuditor.java