Today, I wanted to find column count for all the tables in a PostreSQL schema. The following query could be used.
select table_name, count(*) as column_count from information_schema."columns" where table_schema = 'public' GROUP by table_name order by column_count desc;