I have a directed multigraph. Using the following query, I managed to get the set of nodes that is connected with the node `n1_34`

`MATCH (n1:Node{uuid: "n1_34"}) -[r]- (n2:Node) RETURN n2, r`

This yields the nodes n1_1187, n2_2280, n2_1834 and n2_722 and their relationship as seen in the figure.

From here I need to sort the result based on the number their relationships within this subgraph. That means, `n1_1187`

should be on top with 4 relationships while the others comes after that with 1 relationship.

I have tried and reapplied the solution provided by related question: (Stackoverflow) Extract subgraph from Neo4j graph with Cypher and Count relationship on each nodes. None of these works. The former gives the same result as my original query and the latter gives all the relationships that each node has within the entire graph.

How can I get the relationships within the subgraph?