Checking the number of rows in a PostgreSQL table is very easy. First connect to the database by using pgsql.
psql -U postgres -d "database-name"
Next use the following command to see the number of rows in a certain table.
select count(*) from tablename