Explicitly trigger GC prior to counting; fixes #39.