PDI-8195

What was done:
changed logic for incrementing output rows