Practicing loop counting down to avoid infinite loops