Previously we learned how to count the number of finite index subgroups of a finitely generated group . But for various purposes we might instead want to count conjugacy classes of finite index subgroups, e.g. if we wanted to count isomorphism classes of connected covers of a connected space with fundamental group .

There is also a generating function we can write down that addresses this question, although it gives the answer less directly. It can be derived starting from the following construction. If is a groupoid, then , the **free loop space** or **inertia groupoid **of , is the groupoid of maps , where is the groupoid with one object and automorphism group . Explicitly, this groupoid has

- objects given by automorphisms of the objects , and
- morphisms given by morphisms in such that

.

It’s not hard to see that , so to understand this construction for arbitrary groupoids it’s enough to understand it for connected groupoids, or (up to equivalence) for groupoids with a single object and automorphism group . In this case, is the groupoid with objects the elements of and morphisms given by conjugation by elements of ; equivalently, it is the homotopy quotient or action groupoid of the action of on itself by conjugation.

In particular, when is finite, this quotient always has groupoid cardinality . Hence:

**Observation: **If is an essentially finite groupoid (equivalent to a groupoid with finitely many objects and morphisms), then the groupoid cardinality of is the number of isomorphism classes of objects in .

I promise this is relevant to counting subgroups!