Adding some js to do the counting.