How to use a query_results_count inside another query as a condition?

I’ve got a query inside a query, like so:

The first query (Projekt Loop) iterates through a post’s taxonomy terms. The second query (Kontaktpersoner Loop) gets data from a relationship field inside those terms.

I’d like to show the entire block (Projekt - Kontaktpersoner) based on whether there are any results in any of the Kontaktpersoner Loop queries. Any ideas on how to do that?

TIA!