First add a reference to "Microsoft Scripting Runtime"
then try the code (pass the array to the function)
...(found from google groups)

VB Code:
  1. Sub CountDuplicates(A As Variant)
  2.  
  3.  
  4.     Dim D As Dictionary
  5.     Dim i As Long, key As Variant
  6.  
  7.  
  8.     Set D = New Dictionary
  9.     For i = LBound(A) To UBound(A)
  10.         key = A(i)
  11.         If D.Exists(key) Then
  12.             D.Item(key) = D.Item(key) + 1
  13.         Else
  14.             D.Add key, 1
  15.         End If
  16.     Next i
  17.     i = 0
  18.     For Each key In D.Keys
  19.          If key <> "" Then
  20.             MsgBox key & D.Item(key)
  21.          End If
  22.         i = i + 1
  23.     Next key
  24. End Sub

Hope this helps!