Alternatively in modern Excel, you can keep the VBA function as is and rely on Excel function MAP:
=SUM(1 * (MAP(AC3:AD3; LAMBDA(MyCell; GetFillColor(MyCell))) = 15))