We present a method for microcantilever resonant frequency detection. We measure the direct current from an intermittent contact once every vibration cycle between the conducting cantilever and a counterelectrode at a low bias voltage with respect to the cantilever, while the excitation frequency and amplitude are varied. The result is an almost "digital" detection of the resonant frequency. A relative frequency resolution Delta f/f of 1/80 000 with high signal to noise ratio in ambient conditions is demonstrated. The detection method can be applied to portable sensor systems with very high frequency nanoelectromechanical cantilevers using simple off-chip electronics.