Index: src/pycorba-object.c
===================================================================
--- src/pycorba-object.c	(revision 154)
+++ src/pycorba-object.c	(working copy)
@@ -252,6 +252,13 @@
     
 }
 
+static PyObject *
+pycorba_object__get_refcount(PyCORBA_Object *self)
+{
+    ORBit_RootObject robj = (ORBit_RootObject)self->objref;
+    return Py_BuildValue("i", robj->refs);
+}
+
 static PyMethodDef pycorba_object_methods[] = {
     { "_is_nil", (PyCFunction)pycorba_object__is_nil, METH_NOARGS,
       "_is_nil() -> boolean" },
@@ -267,6 +274,8 @@
       "_hash(maximum) -> int" },
     { "_narrow", (PyCFunction)pycorba_object__narrow, METH_VARARGS,
       "_narrow(stub) -> object" },
+    { "_get_refcount", (PyCFunction)pycorba_object__get_refcount, METH_NOARGS,
+      "_get_refcount() -> integer"},
     { NULL, NULL, 0 }
 };
 
