(Copying a comment from this answer )
You can get the row count for a table from INFORMATION_SCHEMA as follows (but see the description below):
SELECT table_rows FROM information_schema.tables WHERE table_schema = DATABASE() AND table_name IN ('table1', 'table2', 'table3');
However , the MySQL documentation notes that these values ββare not accurate for InnoDb tables: "For InnoDB tables, the number of rows is an approximate estimate used in SQL optimization. (This is also true if the InnoDB table is partitioned.)" If you are using MyISAM, this approach may be sufficient.
source share