This one counts red cells in range a1:a10 using For Next loop. You get the idea . . .
Sub CountTheColors()
RedCells = 0
For N = 1 To 10
CellColor = Range("A" & N).Interior.ColorIndex
If CellColor = 3 Then
RedCells = RedCells + 1
End If
Next N
MsgBox "Number of red cells in the first 10 cells of column A: " & RedCells
End Sub