How to programmatically get the count of WDF objects in a driver?

I wonder if there’s a way to get programmatically (from my diagnostic KMDF driver) the count of WDF objects currently used by another (specific) driver?

Akin to what the following WinDbg command does:

!wdfdriverinfo drvr_name 0x41

and returns as:

WDFDRIVER = 1
WDFDEVICE = 26
WDFQUEUE = 28
WDFWMIPROVIDER = 2
WDFKEY = 2
WDFSTRING = 30
WDFREQUEST = 3
WDFLOOKASIDE = 34
WDFMEMORY = 184
WDFOBJECT = 174
WDFCOLLECTION = 76
FxResourceCm (Internal) = 38
WDFFILEOBJECT = 42
WDFWAITLOCK = 77
WDFSPINLOCK = 115
WDFWORKITEM = 19
WDFINTERRUPT = 19
WDFTIMER = 42
WDFCHILDLIST = 26
WDFWMIINSTANCE = 2
WDFCMRESLIST = 52
FxPkgIo (Internal) = 26
FxPkgFdo (Internal) = 26
FxWmiIrpHandler (Internal) = 26
FxPkgGeneral (Internal) = 26
FxDefaultIrpHandler (Internal) = 26
WDFIOTARGET = 42

The counts are entirely private and not exposed through APIs

@Doron_Holan said:
The counts are entirely private and not exposed through APIs

Any suggestions on how to access them? (Even if they are private.)

No. The extension crawls through internal data structures which were never meant to be externally visible or accessed at runtime (only when the debugger has stopped execution)