[sgen] Use gc_stats minor and major collection counts instead of local variable