When copying data from a file, you get the count of rows in psql with the \"command tag\":
db=# COPY t FROM \'/var/lib/postgres/test.sql\'; COPY 10
Not in PG 9.2, but there is in PG 9.3 courtesy of Pavel (E 1.3.1.7):
Allow PL/pgSQL to access the number of rows processed by COPY (Pavel Stehule) The command is GET DIAGNOSTICS x = ROW_COUNT.
Allow PL/pgSQL to access the number of rows processed by COPY (Pavel Stehule)
The command is GET DIAGNOSTICS x = ROW_COUNT.
http://www.postgresql.org/docs/devel/static/release-9-3.html