I found solution

Sub Count_Colour()
Dim n As Long
Dim cell As Range


For Each cell In ActiveSheet.Range("A1:Z10")
    If cell.Interior.ColorIndex <> xlNone Then n = n + 1
Next cell


MsgBox n & " cells have colour"


End Sub