Consider an example. Let the sampling time be 1 sec. This means the counter will count number of pulses from the unknown signal for 1sec duration and would display it after 1 sec. thus if the signal is of 800 Hz, at the end of 1 sec, counter would have counted up to 800.
Thus in case of high frequencies and high sampling time, counter might count beyond its limit and overflows