Reading signal frequency

comsat:
... the output keep going around 49-51 and it not change although i change the frequency from the signal generator.

comsat:
... when i try unconnected the signal input from pin 8, there is still output and the value is 49-50.

It looks like pin 8, ICP1, the Input Capture pin for timer0/counter0, is open-circuited, and it sees only power frequency noise. An easy way to test this is to connect a high-value resistor - like maybe 100k - between pin 8 and either ground and VCC, ort turn on the internal pullup resistor for pin 8. If ICP1 has no signal connected, then FreqMeasure.available() should never return true. You'll probably want to add some diagnostic code to tell you that it doesn't ever come true, rather than simply waiting to see if nothing happens. Save millis() in setup, and after each look at FreqMeasure.available(), check to see if a second has passed; if it has, Serial.print() something to tell you so, and save millis() again.

Check your frequency generator. It may have a button that disconnects its output. If it's disconnected, all you have connected to ICP1 is an antenna to pick up noise.