frequency detection

Hi its me again lol. I have another question. I have seen that gibson guitars use a system in which you simply move something and the guitar is able to self tune itself by some (i guess) dc motors that can control tuning. Now is there any sensor I can purchase that is able to measure the amount of oscillations a string can make and that can be measure by the arduino to tell which pitch is the string playing??
thanks a lot

Use a microphone breakout board (with amplifier) and frequency measurement software on the Arduino.