When counting documents containing sets, countDocuments allows choosing whether the facets count documents or set instances.
Optional. Default value is true. Use true to count documents and false to count set instances.
A result set contains two documents D1 and D2.
D1 has a set with three items d11, d12, d13 and D2 has a set with a single item, d21.
The value of the output flow will be: