You can't use the count function in a regular XPath in a Retrieve Action (see the documentation for Mendix 9, which clears this up here).
Fortunately, you don't have to count, you simply want to know if at least one exists, and if a condition holds for all children. You can rephrase your query as:
* All Orders which have at least one InvoiceLineDraft
* No InvoiceLineDraft of an Order has no InvoiceLine
The resulting XPath is:
[M.OrderLineDraft_Order/M.OrderLineDraft]
[not(M.OrderLineDraft_Order/M.OrderLineDraft[not(M.OrderLine_OrderLineDraft/M.OrderLine)])]
Note that this XPath has two not() functions over association, which is a performance risk, if you have many objects.
I have used this domain model:
To add to Rom's answer - for performance reasons, in many cases instead of retrieving over a "not" association, it's more performant to first retrieve the list of all orders, then retrieve the list of all orders that have an association, and then subtract that list from the list of all orders.