returning number of missing, matching and total rows from worker, refactored step 3 to make use of a helper function