I have found a app for a frequency counter using a UNO, I myselve have a AtMega 2560.
Please post the code used with the circuit diagram provided.
The issue that I see is not with the lcd pins used, but rather the Schmitt trigger connected to pin8. This is the input capture pin for Timer1, and it's possible that the frequency counter code is using the ICP pin for Timer1.
That pin is not broken out on a Mega, and the code needs to be changed to use Timer4 or 5 which have ICP pins broken out on digital pins 49 and 48.
The lcd can be hooked up to any pins specified in its "constructor", and migrating to a Mega is pretty straightforward.