TITLE: What's the cardinality of a higher category?
QUESTION [13 upvotes]: The cardinality of a set is just the number of elements.  
To make sense of the cardinality of a category, one has to account for the morphisms.  The usual definition is the sum over the isomorphism classes of 1/#automorphisms.

What's the cardinality of a higher category?

I.e., should I somehow take into account the automorphisms between the automorphisms, etcetera?

REPLY [12 votes]: Note that the formula "sum 1/#automorphisms" only depends on the (maximal sub-)groupoid of the category.
So your question becomes: what's a good notion of cardinality for $n$-groupoids (a.k.a. spaces with vanishing $\pi_k$ for all $k>n$)?
One possible answer is to take the sum over connected components of the alternating product of the cardinality of the homotopy groups:
$$
\sum_{components} \frac1{|\pi_1|}\cdot |\pi_2|\cdot \frac1{|\pi_3|}\cdot |\pi_4|\cdot\ldots
$$