Timeline based countdown

Hello.

I want to create a countdown that is based on the timeline.

For instance, there is a timeline of 30 frames. Everytime the 30 frames is up I want to subtract 1 from the countdown.

The trouble is I have no idea how to do this.

If anyone can help it would be much appreciated.

Thanks.