The COUNT(DISTINCT expr) function evaluates the expression for each row, filters out duplicate values and null values, and returns the total count of the remaining unique, non-null values. Options claiming it counts all rows or all non-null values (including duplicates) are incorrect.