ZODB.Architecture.DB.objectCount

Returns
PyIntthe approximate total number of objects in the database