MySQL 4.0 doesn’t have information_schema and ‘show table status from db‘ only gives approximate row count for innodb tables.
So whats the quickest way to get the count of innodb tables, of course other than count(*), which could be slower with big tables.
Updated
When using InnoDB the only accurate count of rows in your entire table is COUNT(*). Since your upgrade from 4.0 to 5.0 will only occur once, you’ll just have to deal with the speed.