How to troubleshoot COPY FROM inserting less rows then expected?
It could be normal if there are newlines in certain text fields. Newlines are allowed when the value in the field is enclosed by double quotes.
And obviously that makes the number of lines in the file greater than the number of records.

Example :

$ cat file.csv
1,"ab
cd",2
3,"efgh",4

$ wc -l file.csv
3 file.csv

=&gt; create table csvtest(a int, b text, c int);
=&gt; \copy csvtest from 'file.csv' with csv

=&gt; select * from csvtest;
 a |   b   | c 
---+-------+---
 1 | ab    | 2
   : cd      
 3 |  efgh | 4
(2 rows)