How do I make a "count" function?

So I want to make a “count” function in my bp graph, for example - I have hit my sphere object once, it should change color to red, hit it the second time, change to green, third time change to blue. Is there a node or a method for a specific “count” function?

I just would use a Integer Variable that you always increase by 1 and check at which value it is. Is it tileable through 2 take red, is it tileable through 3 take blue, otherwise green.

For the Overlap Component, from an older Answer from “vanlacke”:

I dont see the “target” option in any float value how do I get it?