JavaScript Counter example.