added method to update totalRecordCount and errorRecordCount