I'd like a query that counts how many nodes have each label in the dataset. For instance:
LabelA 100 LabelB 200
I can do this for each individual label with something like
MATCH (n:LabelA) return count(n);
But, I'd like to do it for every label in one command.
A quick alternative here, for single labels only, APOC Procedures offers a quick means of using the counts store to get the counts:
Try something like this
This will return the sum of the labels in the first column and the label name in the second.