I think this is what you're looking for:

Counter script