Well, calls to accessor.xquery() return a TResponse. You can get an iterator by calling response.getXMLObjectIterator(). Then you can iterate over all of the xml objects to count them.
Now, if your updates overlap and you actually just want a count of documents that were updated (excluding overlap), then I don’t know. 
#webMethods#webMethods-Tamino-XML-Server-APIs#API-Management