Why do my Cypher queries yield different results?
<p>Why do these two queries yield different results:</p>

<pre><code>MATCH (keanu:Person {name:"Keanu Reeves"})-[:ACTED_IN]-&gt;(kMovie)&lt;-[:ACTED_IN]-(actor:Person),
(actor)-[:ACTED_IN]-&gt;()&lt;-[:ACTED_IN]-(actor2)
WHERE NOT (actor2)-[:ACTED_IN]-&gt;(kMovie) 
RETURN actor2.name, COUNT(actor2) 
ORDER BY COUNT(actor2) DESC
LIMIT 3;
</code></pre>

<p>And the second one is:</p>

<pre><code>MATCH (keanu:Person {name:"Keanu Reeves"})-[:ACTED_IN]-&gt;(kMovie)&lt;-[:ACTED_IN]-(actor:Person),
(actor)-[:ACTED_IN]-&gt;()&lt;-[:ACTED_IN]-(actor2) 
WHERE NOT (actor2)-[:ACTED_IN]-&gt;()&lt;-[:ACTED_IN]-(keanu) 
AND keanu &lt;&gt; actor2
RETURN actor2.name, COUNT(actor2) 
ORDER BY COUNT(actor2) DESC
LIMIT 3;
</code></pre>

<p>The second one gives me the correct result but I don't know why the first one's result is different?</p>

<p>First result:</p>

<pre><code>╒═════════════╤═══════════════╕
│"actor2.name"│"COUNT(actor2)"│
╞═════════════╪═══════════════╡
│"Emil Eifrem"│"6"            │
├─────────────┼───────────────┤
│"Tom Hanks"  │"4"            │
├─────────────┼───────────────┤
│"Stephen Rea"│"3"            │
└─────────────┴───────────────┘
</code></pre>

<p>Second result:</p>

<pre><code>╒═════════════╤═══════════════╕
│"actor2.name"│"COUNT(actor2)"│
╞═════════════╪═══════════════╡
│"Tom Hanks"  │"4"            │
├─────────────┼───────────────┤
│"Stephen Rea"│"3"            │
├─────────────┼───────────────┤
│"Ben Miles"  │"3"            │
└─────────────┴───────────────┘
</code></pre>

<p>The dataset is the sample movie graph dataset that can be created from example graphs part in Neo4j.</p>