psql prints NULL as nothing at all. An empty string also prints as nothing. When a query behaves oddly, telling those two apart is often the whole puzzle.
\pset null '(null)'
SELECT id, email, phone FROM customers LIMIT 3;
id | email | phone
----+-----------------+--------
1 | [email protected] |
2 | (null) | (null)
Row 1 has an empty phone string, row 2 has no value at all. That difference decides whether WHERE phone = '' or WHERE phone IS NULL finds it, and why a count(phone) gives a lower number than you expected. The docs themselves warn that the default empty output is easy to mistake for an empty string.
I like a marker that real data never contains. Some people use the Unicode symbol ∅, which is short and stands out, if your terminal font has it. Add the line to ~/.psqlrc so every session has it.
The setting only changes how psql displays results. Exports with \copy are not affected by it, which is what you want. But a script that parses psql’s normal aligned output will now see the marker as text. Keep that in mind if anything reads your psql output, and run such scripts with psql -X so your personal settings stay out.
Further reading: psql (\pset null)