diff --git a/modules/icing/pirep_goes.py b/modules/icing/pirep_goes.py
index b87e9cb16434782003bc19c28c11820792f61d04..53e11bbf9043d69d8c930f55c9974926eea692e2 100644
--- a/modules/icing/pirep_goes.py
+++ b/modules/icing/pirep_goes.py
@@ -757,12 +757,8 @@ def run_daynight(filename, filename_l1b, day_night='ANY'):
     f.close()
     f_l1b.close()
 
-all_cnt = 0
-valid_cnt = 0
-pass_cnt = 0
 
 def run_qc(filename, filename_l1b, day_night='ANY', pass_thresh_frac=0.20, icing=True):
-    global all_cnt, valid_cnt, pass_cnt
 
     f = h5py.File(filename, 'r')
     icing_alt = f['icing_altitude'][:]
@@ -798,10 +794,6 @@ def run_qc(filename, filename_l1b, day_night='ANY', pass_thresh_frac=0.20, icing
             keep_idxs.append(idxs[i])
 
     print('day_night, icing, all, valid, pass: ', day_night, icing, len(icing_alt), len(mask), len(keep_idxs))
-    all_cnt += len(icing_alt)
-    valid_cnt += len(mask)
-    pass_cnt += len(keep_idxs)
-    print(all_cnt, valid_cnt, pass_cnt)
     print('-----------------------')
     keep_idxs = np.array(keep_idxs)
 
@@ -835,6 +827,8 @@ def run_qc(filename, filename_l1b, day_night='ANY', pass_thresh_frac=0.20, icing
     f.close()
     f_l1b.close()
 
+    return len(icing_alt), len(mask), len(keep_idxs)
+
 
 def apply_qc_icing_pireps(icing_alt, cld_top_hgt, cld_phase, cld_opd, cld_mask, bt_11um, solzen, satzen, day_night='ANY'):