Let me take simple question. I'm counting the number of nodes and relationships per labels and types. I successfully can count nodes like this query.
CALL db.labels() YIELD label
CALL apoc.cypher.run('MATCH (:`'+label+'`) RETURN count(*) as count',{}) YIELD value
RETURN label, value.count
Along with above query, I compiled query to count relationships per types like this, but it not works. Every value.count shows 0.
CALL db.relationshipTypes() YIELD relationshipType
CALL apoc.cypher.run('MATCH ()-[r:`]'+relationshipType+'`]-() RETURN count(*) as count', {}) YIELD value
RETURN relationshipType, value.count
Please point out my mistake... Thanks to have your time.