Sub test()
Dim c As Range, Compte As Integer, t&, u&
Set c = ActiveSheet.UsedRange.SpecialCells(xlCellTypeLastCell)
For t = 5 To c.Row
Compte = 0
For u = 1 To c.Column
If Cells(t, u).Interior.ColorIndex = 6 Then Compte = Compte + 1
Next u
Cells(t, 3) = Compte
Next t
End Sub