Frequency meter

I see this is your first post so perhaps you should read this

and this

and post your code

how?

why not connect the sine wave directly to the arduino?

it seems to me you have designed a cruise ship without checking if it will float.