Part 5 solution Question

I am completely stuck on Part 5, I do not understand how this segment
SELECT count(*)
FROM customer
where country = c.country

from the official solution produces a table with unique countires? How would this equal to 1.
Would anyone be able to explain this segment step by step? I rewrote my code so many times but I cant get any reasonable solution.

The full code from the solution is here:

WITH country_or_other AS
(
SELECT
CASE
WHEN (
SELECT count()
FROM customer
where country = c.country
) = 1 THEN “Other”
ELSE c.country
END AS country,
c.customer_id,
il.

FROM invoice_line il
INNER JOIN invoice i ON i.invoice_id = il.invoice_id
INNER JOIN customer c ON c.customer_id = i.customer_id
)

Thank you in advance!

Hi @pavelbrn:

Kindly and format your code as per these guidelines and indent the lines accordingly so we volunteers can help to better troubleshoot your issue! Thanks