Instead of asking "why doesn't it" - ask yourself why it would
Because whatever would cause it to do that something, that isn't happening, and that's the answer to "why doesn't it" - in other words, you already have the answer to that question.
If you don't know why it would behave you want, then that's saying that you have written something but you don't know what. That's.. a problem, so you would then have to start by deciding what it is you are writing, because otherwise you've got nothing to type
If you print something each iteration, and nothing is printed, then how many times did it iterate? However, the code you posted (isn't intact, please make sure it's intact or I'm not looking at what you ran, that defeats the purpose) doesn't have a print statement in a loop so it wouldn't print anything regardless of how many iterations were executed
You don't need to test anything though. Ask yourself what controls how many iterations there are. You need to fully understand that anyway