compute target_rows to progress automatically