Need help please.

hey anyone know any sensor that can detect coin ? is it possible to use the rotary encoder RE08A to detect the coin ? Please reply ASAP please.
When you insert a coin, it rolls past a series of electromagnets (coils of wire with electricity running through them). These electromagnets create an electromagnetic energy field. Any metal object - like a coin - will disturb this field. Quarters, pennies, dimes, nickels and fake coins affect the field differently, because they are made up of different metals and vary in thickness. Depending on how the field changes, the coin mech knows what kind of coin you inserted. It sorts the good coins into different stacks and tells the computer how much money you've put in.