Ignore the references to the dummy objects used as deleted keys
in dicts and sets when computing the total number of references.
diff --git a/Python/sysmodule.c b/Python/sysmodule.c
index 4a52742..cbf0d8f 100644
--- a/Python/sysmodule.c
+++ b/Python/sysmodule.c
@@ -604,10 +604,9 @@
 static PyObject *
 sys_gettotalrefcount(PyObject *self)
 {
-	return PyInt_FromSsize_t(_Py_RefTotal);
+	return PyInt_FromSsize_t(_Py_GetRefTotal());
 }
-
-#endif /* Py_TRACE_REFS */
+#endif /* Py_REF_DEBUG */
 
 PyDoc_STRVAR(getrefcount_doc,
 "getrefcount(object) -> integer\n\