How to accurately measure 16MHz clock with Oscilloscope
The shape of the waveform won't affect the fundamental frequency of a signal. However an oscilloscope is usually not the correct instrument to accurately measure frequency. It may only have an accuracy of 1% or so.
As @glen_geek points out in his answer some oscilloscopes do have counter/timers built into the instrument that can give high-accuracy (typically only for a single chanell) but the frequency displayed using the normal measurement facilities are usually only obtained after the signal is sampled and so will not be as accurate.
If you want to measure the frequency accurately and your scope does not have a built-in frequency counter you will need a frequency counter/timer such as [Keysight 53230A 350 MHz Universal Frequency Counter1
The wave shape distortion you see is almost certainly because of your probing technique. The probe should have an extremely short ground - a couple of inches is too long. Your oscilloscope probe accessories will probably contain some small springs that are used for this purpose.

To get the best waveform I don't use a probe and instead use coax wired directly to the signal. with very short connections.
If the source cannot drive a coax cable directly a 470 or 910 ohm resistor at the probe point can make an ad-hoc 10:1 or 20:1 attenuator with very good frequency response (up to a few GHz). Set the oscilloscope to 50 ohm input impedance if using this approach.