Solution (source code)

= Solution

Write $A=kG$ and $J=J(A)$, its <Jacobson radical>. First suppose the <characteristic> is $p>0$. We prove the counting statement through the <cocenter of a finite-dimensional algebra>
$$
C(A)=A/[A,A],
$$
where $[A,A]$ is the linear span of commutators, not an ideal. In a <group algebra>, this span is exactly the span of differences of conjugate group elements: $gh-hg$ is such a difference, and $xgx^{-1}-g=[x,gx^{-1}]$. Consequently $C(A)$ has one <basis vector> for each <conjugacy class>.

There is a well-defined <Frobenius map on an algebra cocenter>
$$
F:C(A)\longrightarrow C(A),\qquad [a]\longmapsto[a^p].
$$
Here $F$ is additive and $F(c[a])=c^pF([a])$. To prove additivity, expand $(a+b)^p$ into words of length $p$. Cyclic rotations of a word are equal modulo commutators. Every nonconstant word has a rotation orbit of length $p$, so its orbit contributes zero; only $a^p,b^p$ remain. Also
$$
[(xy-yx)^p]=[(xy)^p]-[(yx)^p]=0,
$$
because the two products are cyclic rotations. Additivity then shows that the whole commutator subspace maps to zero, proving well-definedness on the quotient.

Let $s$ be the number of <simple modules> up to isomorphism. The <semisimple algebra> $A/J$ is $\prod_{\nu=1}^sM_{d_\nu}(k)$: over an <algebraically closed field>, a finite-dimensional <division algebra> is the <field> itself, since the <minimal polynomial> of any element splits into linear factors and a <division algebra> has no zero divisors. In a <matrix algebra>, the commutator subspace is precisely the <traceless matrices>. Off-diagonal <matrix units> are commutators, and $E_{ii}-E_{jj}=[E_{ij},E_{ji}]$; these span that subspace in every characteristic. Thus
$$
C(A/J)\cong k^s.
$$
The map induced by $F$ on each coordinate is $z\mapsto z^p$, since $\operatorname{tr}(B^p)=(\operatorname{tr}B)^p$. This is bijective because $k$ is a <perfect field>.

The natural surjection $C(A)\twoheadrightarrow C(A/J)$ has <kernel> $(J+[A,A])/[A,A]$. Every <kernel> class has a representative in $J$. Since $J$ is nilpotent, $F^N$ kills that <kernel> for sufficiently large $N$. On the quotient it remains bijective, so its image has dimension exactly $s$. On the conjugacy-class basis, however,
$$
F^N([g])=[g^{p^N}].
$$
For large $N$, every $g^{p^N}$ is a <p-regular element>; moreover the $p^N$-power map permutes the p-regular conjugacy classes, because an inverse exponent can be chosen modulo the prime-to-$p$ part of the exponent of $G$. The stable image therefore has precisely those conjugacy classes as its basis. Comparing dimensions proves
$$
\boxed{\#\{\text{simple }kG\text{-modules}\}
=\#\{\text{p-regular conjugacy classes of }G\}.}
$$
This argument uses dimensions of semilinear images: a bijective scalar Frobenius map preserves dimension, so the usual rank count applies.

In characteristic zero every group element is relevant. Averaging a linear projection onto a <submodule> over $G$ makes that projection $G$-equivariant, proving <Maschke's theorem> and semisimplicity of $kG$. The same matrix-algebra cocenter calculation now gives $s=\dim C(kG)$, the total number of conjugacy classes.

For the second request, $M$ is a <relative projective module> for $H$ when every $G$-equivariant epimorphism onto $M$ which splits after restriction to $H$ already splits over $G$. Equivalently $M$ is a <direct summand> of $kG\otimes_{kH}M$, the <induced representation> of the <restriction of a representation> to $H$. We can verify the defining splitting property directly: if $q:N\twoheadrightarrow M$ has an $H$-linear section $u$, choose representatives $T$ of the left <cosets> $G/H$ and set
$$
v(m)=\frac1{[G:H]}\sum_{t\in T}t\,u(t^{-1}m).
$$
The sum is independent of representatives by $H$-linearity. Reindexing $gt=t'h$ proves $G$-linearity, while $qv(m)=[G:H]^{-1}\sum_tm=m$. Hence \b[every $M$ is relatively $H$-projective when the index is invertible in $k$].

For completeness the canonical induced-module epimorphism $\varepsilon(g\otimes m)=gm$ has the explicit $G$-linear section
$$
\boxed{\sigma(m)=\frac1{[G:H]}\sum_{t\in T}t\otimes t^{-1}m,\qquad \varepsilon\sigma=\operatorname{id}_M.}
$$
It exhibits the promised <direct summand> and is the <projectivity detected on a subgroup of invertible index> construction.