Err. Except in that while statement there should be a: "counter++" line right before we read new data.
Err. Except in that while statement there should be a:
"counter++"
line right before we read new data.