Well... THAT was "entertaining"... I just spent 20 minutes looking in vain on the web for a decent description, or even photo, of something that I KNOW exists!
So instead, I'll just "paint" it in words...
Once upon an time!!! you could buy a simple little device. You can still make your own, if you don't track a supplier down. (Don't be fooled into buying anything more complicated than what you need)
It had an LED and a photosensor embedded in a small block of plastic. They both pointed the same way. When something was in front of one of these reflective opto sensors, the light from the LED bounced off the thing in front of it, back into the photosensor.
As they say at "CompareTheMeerkat.com"... Simples!
Regarding your countertop... if there were specific places to put glasses to get lit up rings of LEDs, cool. I would compare this to a stove top, where the "rings" are in fixed positions.
For a whole new level of cool, how about a matrix of sensors... one every 5mm, say (expensive, but what the heck)... and a matrix of LEDs. The LEDs lit up for a given ring would now not always be the same.... move the glass 5mm, and the ring moves 5mm. A given LED might be at the top of a ring one day, or the side of one another day.
Oh dear... that has set me thinging FURTHER....
For a counter-top, you can assume some convenient opportunities. It isn't going to move. It will be under a ceiling. So embed upward looking photo sensors in the countertop, and put some good lights on the ceiling over it.
OR.... a webcam on the ceiling, looking down on the counter. As your hand moves to pick up a glass, the hand's shadow would be lit up by the LEDs under it.....
I'd better stop.