When opening edit sessions with OnlyOffice, the system will open the documents in edit mode until there are no more licenses available. When sharing the OnlyOffice document server with another application one app can consume all the editor licenses and left not editor instances for the other app.
To solve this OpenOlat should have a config option to limit the maximum number of documents that are opened in OnlyOffice in edit mode at any given time.
The count is probably implemented based on the lock infrastructure that already holds this information. To make the currently opened documents visible as a count would be a first step in that direction (for better monitoring).