Spider, way way way back in our releases section, most likely on back page, find UnoLimited.
I locked the topic, but in it was one way to do it at the time.
(Garry's original prop counter lua code has probably changed a bit)
That is probably the simplest place to start looking.
URS Beta, not as far back in releases, also included some of the same basic ideas I used too I think.
At least, the original author asked to include stuff from UnoLimited.
From there, feel free to ask questions.