Number of conjugacy classes in a direct product is the product of the number of conjugacy classes in each factor

This article gives an expression for the value of the arithmetic function number of conjugacy classes of an external direct product in terms of the values for the direct factors. It says that the value for the direct product is the product of the values for the direct factors.
View facts about number of conjugacy classes: (facts closely related to number of conjugacy classes, all facts related to number of conjugacy classes)
View facts about external direct product: (facts closely related to external direct product, all facts related to external direct product)
View facts about product: (facts closely related to product, all facts related to product)

Statement

For two groups

Suppose $G_1$ and $G_2$ are groups. Suppose the number of conjugacy classes in $G_1$ is $a_1$ and the number of conjugacy classes in $G_2$ is $a_2$.

Then, the number of conjugacy classes in the external direct product $G_1 \times G_2$ is the product $a_1a_2$.

Note that this says that when either $G_1$ or $G_2$ has infinitely many conjugacy classes, so does $G_1 \times G_2$, and the product statement is interpreted in the sense of infinite cardinals. If both $G_1$ and $G_2$ have finitely many conjugacy classes, then so does $G_1 \times G_2$.

For multiple groups

Suppose $G_1,G_2,\dots,G_n$ are groups. Suppose the number of conjugacy classes in $G_1$ is $a_1$, in $G_2$ is $a_2$, and so on.

Then, the number of conjugacy classes in the external direct product $G_1 \times G_2 \times \dots \times G_n$ is the product $a_1a_2 \dots a_n$.

If all the $a_i$ are finite, then so is the number of conjugacy classes in the direct product, and the multiplication is the usual multiplication of natural numbers. If one or more of the $a_i$ is infinite, then the number of conjugacy classes in the direct product is also infinite, and the product is interpreted in terms of infinite cardinals.

Note that the statement also holds for an internal direct product, because of equivalence of internal and external direct product.