title: Neo4j - Cypher return 1 to 1 relationships
body: <p>Using neo4j 1.9.2, I'm trying to find all nodes in my graph that have a one to one relationship to another node. Let's say I have persons in my graph and I would like to find all persons, that have exactly one friend (since 2013), and this one friend only has the other person as friend and no one else. As a return, I would like to have all these pairs of "isolated" friends.</p>
  
  <p>I tried the following:</p>
  
  <pre><code>START n=node(*) MATCH n-[r:is_friend]-m-[s:is_friend]-n
  WHERE r.since &gt;= 2013 and s.since &gt;= 2013
  WITH n, m, count(r), count(s)
  WHERE count(r) = 1 AND count(s) = 1
  RETURN n, m
  </code></pre>
  
  <p>But this query does not what it is supposed to do - it simply returns nothing.</p>
  
  <p>Note: There exists just one relation between the two persons. So one friend has a incoming relationship and the other one an outgoing one. Also, these two persons might have some other relations, like "works_in" or so, but I just want to check if there is a 1:1 relation of type *is_friends* between the persons.</p>
  
  <p><strong>EDIT:</strong> The suggestion of Stefan works perfect if using node(*) as starting point. But when trying this query for one specific node as start point (e.g. start n=node(42)), it doesn't work. What would the solution look like in this case?</p>
  
  <p><strong>Update:</strong> I'm still wondering about a solution for this szenario: How to check if a given start node has a 1-to-1 relation to another node of a specific relationship type. Any ideas?</p>