• Just tried these out, and this:

    /*(9)*/ SELECT DISTINCT(COUNT(1)) FROM #TmpCounts; -- 1 row

    Actually returns 6. This is on SQL Server 2008.