Simple counter animation in js