There is no limit on the number of rows in a table but it is limited to available disk space and memory/swap space. If you are storing rows that exceed 2 KB aggregated data size, then the maximum number of rows may be limited to 4 billion or less.
Counting is one of the easiest SQL statements, so it is also many people's first experience of a PostgreSQL query.