(technically) it is possible to count how many rotation/revolution did the ac gear motor made? if yes how?
Yes, use a shaft encoder.
For whole rotations a simple magnet and hall sensor can count them. Or it can be done optically.
I use QRE1113 reflective optical detectors to count and time the revolutions of a small DC motor. The sensor detects a blob of white paint on a black disk on the motor shaft.
Sparkfun sells them on a breakout board but they are big enough for hand soldering if you don't want the breakout board. Even though you just want digital pulses use the circuit schematic that Sparkfun refers to as an analog circuit.
...R