[3.8] bpo-37990: fix gc stats (GH-15626)

(cherry picked from commit 013e52f)
2 files changed