Sub toto()
Dim i As Integer, compte As Integer
With Sheets("Feuil1")
For i = 1 To .Range("A" & .Rows.Count).End(xlUp).Row
If .Cells(i, 1) = .Cells(i + 1, 1) Then
compte = compte + 1
Else
.Cells(i, 2) = compte + 1
compte = 0
End If
Next i
End With
End Sub