  Let ${\mathfrak{X}}$ be a class of finite groups closed under taking
subgroups, homomorphic images, and extensions. Denote by
${\mathrm{k}}_{\mathfrak{X}}(G)$ the number of conjugacy classes
${\mathfrak{X}}$-maximal subgroups of a finite group $G$. The natural problem
to describe up to conjugacy ${\mathfrak{X}}$-maximal subgroups of a given
finite group is complicated by the fact that it is not inductive. In
particular, generally speaking, the image of an ${\mathfrak{X}}$-maximal
subgroup is not ${\mathfrak{X}}$-maximal in the image of a homomorphism.
Nevertheless, there are group homomorphisms which preserve the number of
conjugacy classes of ${\mathfrak{X}}$-maximal subgroups (for example, the
homomorphisms whose kernels are ${\mathfrak{X}}$-groups). Under such
homomorphisms, the image of an ${\mathfrak{X}}$-maximal subgroup is always
${\mathfrak{X}}$-maximal and, moreover, there is a natural bijection between
the conjugacy classes of ${\mathfrak{X}}$-maximal subgroups of the image and
preimage. All such homomorphisms are completely described in the paper. More
precisely, it is proved that, for a homomorphism $\phi$ from a group $G$, the
equality
${\mathrm{k}}_{\mathfrak{X}}(G)={\mathrm{k}}_{\mathfrak{X}}(\mathrm{im}\,
\phi)$ holds if and only if ${\mathrm{k}}_{\mathfrak{X}}(\ker \phi)=1$, which
in turn is equivalent to the fact that the composition factors of the kernel of
$\phi$ belong to an explicitly given list.
