Take a look at the following sample data (column B):
If you want the result to be 2 (abc and ghi are counted as duplicates) then the following code will do the trick:
Dim x, cDup, lRow As Integer, skipDup As String
lRow = Range("B1").End(xlDown).Row
x = 1
cDup = 0
x = x + 1
If Cells(x, "B").Value = Cells(x - 1, "B").Value And skipDup <> Cells(x, "B").Value Then
cDup = cDup + 1
skipDup = Cells(x, "B").Value
Loop Until x = lRow + 1
MsgBox "Column B contains " & cDup & " Duplicates."
If this isn't what you meant, then please provide some sample data of your own along with the desired result.