A photonic approach for microwave frequency measurement is proposed. In this approach, an optical carrier is modulated by an unknown microwave signal through a phase modulator. The modulated optical signal is then split into two parts; one part passes through a spool of polarization maintaining fiber (PMF) and the other one, through a dispersion compensation fiber (DCF), to introduce different microwave power penalties. After the microwave powers of the two parts are measured by two photodetectors, a fixed frequency-to-power mapping is established by obtaining an amplitude comparison function (ACF). A proof-of-concept experiment demonstrates frequency measurement over a range of 10.5 GHz, with measurement error less than +/-0.07 GHz.