add counter function and go to gameResultScene