Neo4j - Counting Nodes with Labels
A quick alternative here, for single labels only, APOC Procedures offers a quick means of using the counts store to get the counts:
CALL apoc.meta.stats() YIELD labels
RETURN labels
Try something like this
MATCH (n)
RETURN count(labels(n)), labels(n);
This will return the sum of the labels in the first column and the label name in the second.