+2 votes
in Databases by (51.8k points)
I want to count the number of nodes in each label in a given Neo4J database. What is the Cypher query for it?

1 Answer

+2 votes
by (281k points)
selected by
Best answer

You can try the following Cypher query to get the count of nodes for each label. The query will return node labels and their node count.

RETURN labels(n) as NodeLabel, count(labels(n)) as LabelCount;