This paper reports on the construction of an optical frequency counter using two modelocked fiber laser combs. Two simple methods for the determination of the mode number of the beating comb line are introduced. Both methods are independent of the frequency fluctuation of the laser under measurement; therefore, they are suitable in constructing an automatic optical frequency counter.