change the deprecated method to other solution

I change the deprecated method `counte.stop()` to other solution (while loop is stopped when the stop variable is true, changed by stop method of CounterGui.