Frankly, ls /proc/[0-9]*/fd/* | wc -l would be my\r\nexpedient.
\r\n\r\nOtherwise, I'd suggest lsof, either as an OS call, or\r\npulling apart the sources to see where it's grabbing its\r\ninformation.
\r\n\r\nRemember that /proc is system state, and that file\r\noperations on /proc may be the preferred operational method.
\r\n