How do I show the number of tables in all databases? I am looking for a query that return all the databases in my MySQL database (i.e. like SHOW DATABASES; but includes the number of tables in the tabular result.)

Something that outputs:

+--------------------+--------+
| Database           | Tables |
+--------------------+--------+
| information_schema |     40 |
| db1                |     97 |
| db2                |    135 |


etc.

Is there a simple query or command that can be typed from the mysql command line that produces that.
You can use the information_schema.tables

select table_schema, count(1)
from information_schema.tables
group by table_schema