SELECT count(*) TABLES, table_schema FROM information_schema.TABLES where table_schema = 'test' GROUP BY table_schema