counter not working