Led as an input photodiode [Arduino AVR]
You need to read the value TCNT1 into a variable straight after your while loop and before you start printing stuff, then print the value of that variable.

Why? TCNT1 is counting at 16MHz. Your serial port baud rate is 9600.  A single character (start bit, 8 data bits, stop bit) will therefore take ~10.4ms to transmit. In this amount of time, TCNT1 will increment 16,666 times. In the time 4 characters take to transmit, TCNT1 will wrap around and start counting up from zero again.