The finally block will always run wether the try block passes or fails. What your program is doing is adding one to each tries variable.

So when its at 4 at the end of the loop it adds 1 more. If...