public int countRows(final TableName tableName) throws IOException {
    try (Table table = getConnection().getTable(tableName)) {
      return countRows(table);
    }
  }
Return the number of rows in the given table.
hbase-server/src/test/java/org/apache/hadoop/hbase/HBaseTestingUtil.java