select schema_name, object_type, count(*) from dba_objects where schema_name in ('PUBLIC') group by schema_name, object_type order by schema_name, object_type;
===========================================
SELECT
n.nspname as schema_name
,CASE c.relkind
WHEN 'r' THEN 'table'
WHEN 'v' THEN 'view'
WHEN 'i' THEN 'index'
WHEN 'S' THEN 'sequence'
WHEN 's' THEN 'special'
WHEN 'm' THEN 'materialized view'
WHEN 'p' THEN 'partitioned table'
WHEN 'f' THEN 'foreign table'
WHEN 'c' THEN 'composite type'
END as object_type
,count(1) as object_count
FROM pg_catalog.pg_class c
LEFT JOIN pg_catalog.pg_namespace n ON n.oid = c.relnamespace
WHERE c.relkind IN ('r','v','i','S','s','m','p','f','c') and n.nspname IN ('public')
GROUP BY n.nspname,
CASE c.relkind
WHEN 'r' THEN 'table'
WHEN 'v' THEN 'view'
WHEN 'i' THEN 'index'
WHEN 'S' THEN 'sequence'
WHEN 's' THEN 'special'
WHEN 'm' THEN 'materialized view'
WHEN 'p' THEN 'partitioned table'
WHEN 'f' THEN 'foreign table'
WHEN 'c' THEN 'composite type'
END
ORDER BY n.nspname,
CASE c.relkind
WHEN 'r' THEN 'table'
WHEN 'v' THEN 'view'
WHEN 'i' THEN 'index'
WHEN 'S' THEN 'sequence'
WHEN 's' THEN 'special'
WHEN 'm' THEN 'materialized view'
WHEN 'p' THEN 'partitioned table'
WHEN 'f' THEN 'foreign table'
WHEN 'c' THEN 'composite type'
END;