try this:
Open Excel, Alt+F11, On Modules add new Module and write this:
Function ColorCount(varRange As Range, varColor As Range) As Variant
Dim VarTemp As Variant, cell As Range
ColorCount = 0
For Each cell In varRange
If cell.Interior.ColorIndex = varColor.Interior.ColorIndex Then
ColorCount = ColorCount + 1
End If
Next
End Function
Use formula:
=Colorcount(Column;selected color cell)