declare
v_table varchar2(60);
v_num number;
v_sum number;
begin
v_sum:=0;
for idx in (select * from user_tables order by table_name) loop
v_table:=idx.table_name;
execute immediate 'select count(*) from ' || v_table into v_num ;
v_sum:=v_sum+v_num;
end loop ;
dbms_output.put_line(v_sum);
end;