Here's something quick n dirty, but it does what you're looking for.
It's essentially requires you to employ helper cells to do the math.
A1 is the cell in which you change the color you wish to count.
Adjust the ranges to suit your requirements.
Dim cRange As Range, cSum As Range
Dim cCell As Range, tCell As Range
Dim c As Range
Set cRange = Range("C1:C10") 'your color range
Set cCell = Range("A1") 'base color to count
Set cSum = Range("D1
10") 'apply number to matching color
Set tCell = Range("B1") 'Sum Total matching colors
For Each c In cRange
If Not c.Interior.Color < cCell.Interior.Color Then
c.Offset(0, 1).Value = 1
tCell = WorksheetFunction.Sum(cSum)
Someone else may be able to give it a crew-cut to improve.