If I understand correctly you want to know wuich of the following two examples is more efficient:

1.) SELECT COUNT(DISTINCT deptno) FROM scott.emp;
2.) SELECT COUNT(deptno) FROM scott.emp GROUP BY deptno;

Well, they will perform exactly the same, as they have identical explain plans:

Execution Plan
-------------------------------------------------
0 SELECT STATEMENT Optimizer=CHOOSE
1 0 SORT (GROUP BY)
2 1 TABLE ACCESS (FULL) OF 'EMP'

HTH,