It isn't really all that complicated. The following script works as a clock display on any length video. 98% of what I do are countdowns (the reverse of this). Doing precomps work. Using key frames does too. Adjusting the framerate does too. It is all about what you need and how much time you're willing to wait for it to render. You might want to add an slider with key frames so that the counter doesn't have to be 100% accurate (make it look like clips have put together)
But. Here's the magic sauce.
elapsedSeconds = Math.floor(time);
min = Math.floor(elapsedSeconds/60);
secondspart = elapsedSeconds - min*60;
if (secondspart < 10)
'' + min + ":0" + secondspart;
else
'' + min + ":" + secondspart;