This is a regression introduced with
OAK-7645 when the MongoDB Java driver was updated to 3.8.
With the switch to the new driver, the use of a deprecated method count() was replaced with countDocuments(). The method countDocument() behaves differently and performs an aggregation command over all documents in the collection. The MongoDB log would then show something like: