I think you want to use && in your condition instead of ||.
The way you've written it it will keep going if either condition is true, so it will only stop if they are both false.
EDIT: after reading your question more closely, I think you need to use
while (0 == $date1 && $this->counter < 5 ) {