Dialogue with the timer counter (TC)

Hi everyone,
I state that I'm a beginner ...
For my final purpose I need to use the timer counter in the mode "event counting" to assess the duration of each semi-period of a square wave (the square wave is my analog input).
I tried to look in the manual, but I didn't find any example about this.
If someone could help me or give me some guidance I would be really grateful.
Thank you very much.