The result is the number of distinct non-NULL buckets.
highlighted = computed this step
Count result
After NULLs are skipped and duplicates fold, the result is the bucket count.
COUNT DISTINCT result
Read the result
From 8 input rows, the distinct buyer count is 3.
distinct count=3
COUNT DISTINCT examples are tiny finite-table transforms; SQL dialect completeness, collations, type coercion, optimizer behavior, execution cost, indexing, and database-product claims are out of scope.
Not row count
The distinct count is smaller than the input row count because repeats and NULLs do not add buckets.