Counting how many times something happens each second would involve a timer, a current count and a count total. Since you are adding frames, every frame, add 1 to the current count. Whenever the timer is greater than or equal to a second, set the count total to the current count, reset current count to zero and reset the timer. The count total will then hold the amount of frames that happened in the previous second until the next second has completed.
Note that his updates (approximately) once per second.
A similar code (and an alternative) should be present on the thread you quoted.