I can get the number of columns in all the tables in a postgresql database by
SELECT TABLE_SCHEMA, TABLE_NAME, COUNT(*)
FROM INFORMATION_SCHEMA.COLUMNS
GROUP BY TABLE_SCHEMA, TABLE_NAME;
I can get the number of rows in a specific table in a database by
SELECT COUNT(*) FROM mytable
How to obtain column and row counts for all table in a database in one query?