(2) Update one or of the database's entries.
If I replace the document via the DBA, or if I run an update expression via the Queries Panel, the count always reflects the number of resources, it doesn’t change.
How did you update the document? Is it an XML document or a binary file you updated?
Maybe I have a misundertanding in what the Optimize button on the BaseX Database Administration's Database page actually does.
Feel free to have a look into our documentation [1].