There does not seem to be a way to count uncommitted objects reliably.
Tests adapted accordingly.