Query to get record count of all tables in a schema

Use this query to get the record count of all tables in a schema.

select

table_name,
to_number(
extractvalue(
xmltype(
dbms_xmlgen.getxml('select count(*) c from '||table_name)
),'/ROWSET/ROW/C')) count
from user_tables order by 1

The output is like

table_name count
----------- --------
DEPT 4
EMP 14


Courtesy: http://laurentschneider.com/wordpress/2007/04/
how-do-i-store-the-counts-of-all-tables.html