Need Help with using appropriate sensor for detecting movement

I have a use case to create an artificial beating human heart. The heart mold is created using resin rubber and the beat movement is to be simulated using a servo motor. How do i count the number of beats Or the movement made by servo arm using a sensor? Can i please know what sensor i can use for this purpose that can detect this movement. The sensor should be able to record the servo movements and send the signals that can be counted.

The main purpose is to find how fast Or slow the heartbeat is.

Strange. What is controlling the servo? You have no access to that timing somehow, is it a different CPU driving it or what?

If the same program and MCU is controlling both servo and sensor, you could just eliminate the sensor and track the servo commands...

See what I mean?

Familiar yourself with sensors and their use/capability:

list of Arduino sensors site:adafruit.com at DuckDuckGo

How do you personally, right now, count the beats? Do you hear noise? Do you see movement? If you touch the heart, do you feel anything? Any of those sensations might be used by a sensor to detect a heart beat.