Issue title: Equivalent count queries have very different execution time. Negation vs disjunction.
 Issue body: ## Description

We can count the number of people with an email address or a phone number in two ways.

1) By executing the following query:

`match $p isa person; not { $p has phone_number $pn; }; not {$p has email_address $ea;}; count;`

2) Or, by first counting the number of people:

`match $a isa avatar; count;`

and then deducting the result of the following query from it:

`match $p isa person; { $p has phone_number $pn; } or {$p has email_address $ea;}; count;`

The second approach takes about 10% the time of the first. The numbers from each count (before the deduction) are very similar (around 8000 out of a total 17000 people).

I don't know if this points to a serious underlying issue, or if it's just an unusual edge-case.

## Environment

1. OS - Windows
2. TypeDB version 2.10.0

## Reproducible Steps

See above.

## Expected Output

Both queries to take the same amount of time.

 Comments: 
 Comment 0: Just to be sure - the query in `2.` is asking for `avatar` not `person`?
 Comment 1: > Just to be sure - the query in `2.` is asking for `avatar` not `person`?

Sorry no that was incorrect, I've fixed it.
 Comment 2: Can we provide the minimal schema to reproduce this issue, @thomaschristopherking ?
 Comment 3: > Can we provide the minimal schema to reproduce this issue, @thomaschristopherking ?

Sorry just saw this, was on vacation. Added a schema. Might have more than needed (the attribute relations) but it matches what we have.
{'source': 'GithubIssues', 'repo_name_with_owner': 'vaticle/typedb', 'issue_id': 1255575506, 'repo_stars': 599.0}