Update row counter in print statement