From what I understand, you want to "count" (do you mean combine together as one DEPT (DEPT='*DUPS*'; )???
Regardless, I believe you will need to pre-process your data file with a DATA step, as follows:
1) sort SAS member input by DEPT, creating a temp file.
2) use DATA step to input/output the temp file, and use FIRST.DEPT and LAST.DEPT to determine where there are multiples, and do something -- either combine these into a single DEPT value or establish a new "count" variable).
3) sort your temp file in DEPT sequence.
4) Use PROC MEANS, as you have shown in your code.
Scott Barry
SBBWorks, Inc.