Vibration Measurement using Accelerometer ADXL335
A trivial solution could be to calculate the derivative (aka the difference between two samples) to find the relative maximum points and then calculate the time between two positive peaks.

In this case I would suggest to smooth a little bit the values (compatibly with the sampling frequency and your bandwith requirements) to avoid occurring in local maxima.

Once found the frequence you could also calculate the FFT over a number of periods and it would give you more informations about the harmonics of the vibration, if more than one.