public static int countMobRows(final Table table) throws IOException {
    Scan scan = new Scan();
    // Do not retrieve the mob data when scanning
    scan.setAttribute(MobConstants.MOB_SCAN_RAW, Bytes.toBytes(Boolean.TRUE));
    return HBaseTestingUtil.countRows(table, scan);
  }
Gets the number of rows in the given table.
@param table to get the scanner
@return the number of rows
hbase-server/src/test/java/org/apache/hadoop/hbase/mob/MobTestUtil.java