I'm late to the party, but this gives 20 as an answer


Option Explicit

'IsEmpty returns True if the variable is uninitialized, or is explicitly set to Empty; otherwise, it returns False.
'False is always returned if expression contains more than one variable.
'IsEmpty only returns meaningful information for variants.

Sub test()
    Dim lastrow As Long
    Dim sq2d As Long
    Dim r As Range, c As Range
    
    lastrow = 94
    
    Set r = Range("A2:A" & lastrow)
    For Each c In r.Cells
        With c
            If Len(.Value) > 0 Then
                If .Interior.ColorIndex <> 15 And .Interior.ColorIndex <> 16 Then
                    sq2d = sq2d + 1
                End If
            End If
        End With
    Next c
    MsgBox sq2d
End Sub

Sub FindColorIndex()
    MsgBox Range("A2").Interior.ColorIndex
    MsgBox Range("A93").Interior.ColorIndex
    MsgBox IsEmpty(Range("A93"))
End Sub