ORDA query by related Entity Selection Length?

Let’s say I have tables “Clients” and “Invoices” (and a relation from Clients to Invoices of “relInvoices”) and I want to query Clients where the related invoice count is X. How do I do this in ORDA? (I’ve tried about 5 different ways and can’t find what works)

E. g.

<code 4D>
$params:=New object(“args”;New object(“count”;1))
</code 4D>

I invite you to come to my session, where the topic is “ORDA in real life” :mrgreen:

Thanks for the reply.
That worked!