Trying to work out why its not updating the counter