If a group has only NULL cells in the counted column, it has no distinct non-NULL bucket.
all NULL gives zero
Read the zero
The all-NULL group count is 0, and the compiler marks 1 all-NULL group.
count=0
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.
Zero is explicit
This zero comes from an empty distinct non-NULL bucket list.