if (!collectionName.startsWith("/db")) collectionName = "/db" + collectionName;
collectionName = NativeBroker.checkPath(collectionName, "/db");
    public int getResourceCount(User user, String collectionName)    throws EXistException, PermissionDeniedException {        DBBroker broker = null;        Collection collection = null;        try {            broker = brokerPool.get(user);            if (!collectionName.startsWith("/"))                collectionName = '/' + collectionName;            if (!collectionName.startsWith("/db"))                collectionName = "/db" + collectionName;            collection = broker.openCollection(collectionName, Lock.READ_LOCK);            return collection.getDocumentCount();        } finally {            if(collection != null)                collection.release();            brokerPool.release(broker);        }    }