Considering that users can be programmatically created or provisioned from external user directory systems and that once the license count is exceeded Bitbucket becomes Read-Only, it is critical to monitor the license usage to quickly react when the active users is approaching the threshold or it is reached.
Provide JMX counters for monitoring the license details.
For example, Jira exposes the jira.license counter which provides the following:
The types of licenses you have, the number of active users, and the maximum number of users available for each license type.
The Bitbucket REST API provides an endpoint to query for licensed users.
Here is an example
More options are available on the How do I find which users count against my bitbucket server license article.