The molecular formula of $X$ is $C_6H_7N$, which corresponds to
aniline ($C_6H_5NH_2$), a primary aromatic amine.
\[
X = \mathrm{C_6H_5NH_2}
\]
On treatment with benzenesulphonyl chloride
($\mathrm{C_6H_5SO_2Cl}$), aniline undergoes the Hinsberg reaction
to form a sulphonamide:
\[
Z = \mathrm{C_6H_5SO_2NH C_6H_5}
\]
The product $Z$ is soluble in alkali due to the presence of an acidic
$\mathrm{N\!-\!H}$ proton, confirming that $X$ is a primary amine.
Now, determine the number of different types of hydrogen atoms
present in $Z$.
\begin{itemize}
\item One type of hydrogen due to the N--H proton.
\item The aromatic protons in the phenyl rings appear in four distinct
chemical environments due to symmetry and substitution effects.
\end{itemize}
\[
\text{Total different hydrogen atoms} = 1 + 4 = 5
\]
\[
\therefore \text{Number of different hydrogen atoms in } Z = \boxed{5}
\]