pythoncom._GetInterfaceCount
int = _GetInterfaceCount()
Retrieves the number of interface objects currently in existance
Comments
If is occasionally a good idea to call this function before your Python program terminates. If this function returns non-zero, then you still have PythonCOM objects alive in your program (possibly in global variables).