Wrap the first query in ( ) as the source table for the second query, like this.
COUNT([work_order]) AS [n_orders]
SELECT DISTINCT [work_order]
FROM [Data Source]::[Export_Output_20180608]
Remember that the first query means the inner query (subquery, nested query). It appears after the second (outer) query on the page. SQL is an onion, with the result (the outside world) at the top, the beginning in the middle.
(If there are more than two layers, as there often are, then we need words like "innermost", "outermost", "next query out", etc. Sometimes that becomes a bit tricky in English--but it is always easy to see in the code, provided attention is paid to indentation and other formatting.)