Not sure if this would help, but the count of documents in a tray can be shown by clicking on a "count" link for a tray from the list of dialogs accessible from the Platform Service
http://<local docuware url>/DocuWare/Platform/Organizations/Dialogs
Charles