Counting clicks on a element

Hello all, I’m struggling to add a click event to a element. Basically I would like to count how many times an object (rectangle) was clicked. Any ideas?

Checkout the PickingMaterial op.

Thanks @andro for your help, I have created a simple test but it doesn’t seem to work. Do I miss something ?