I have this query:
MATCH (n) WHERE ID(n) = 770892 OPTIONAL MATCH (n)-[s:TAGGED_TOGETHER]-(d) WHERE s.tagged_together >= 0 AND ((d.timestamp>'2018/01/01' AND d.timestamp<'2019/01/01') OR (d.removed_timestamp>'2018/01/01' AND d.removed_timestamp<'2019/01/01')) AND d.nodeDegree>=0 RETURN n AS node, d AS tagged, size((n)-[s]-()) AS counter
I want to return how many tagged_together relationships there are for the selected node n,
but in this way the output for the column
counter is always 1 for each row
although it has more of one relationship . Is there a way to return the total counter of all the relatioship or to sum each value in the column ?