Both seem to work exactly the same way, but the are really quite different. Let's explore the difference. This copy is executed until the recursive call is made, at which point another copy is made. Of course, the function that called up the 10th copy of count was the 9th copy. The difference is not readily apparent with this simple version of recursion called tail recursion .
Tail recursion occurs when the recursive call is the last statement in the function.
Because each copy of count has no further commands, it is not obvious that this is happening. Each copy of count exists separately and, in each, count has a different value. This shows the recursive nature of the solution. Otherwise, we call the factorial function again. The Towers of Hanoi Recall the simplified version of the Towers of Hanoi a few lessons ago.