Count with GC may fail to run

fix issue with tests introduced in #164