The reaction proceeds as follows:
Cyclohexane $\xrightarrow{\text{Br}_2}$ C$_6$H$_{10}$Br$_2$
1. Product A: Bromination followed by elimination with alcoholic KOH gives a conjugated diene:
\[\text{C}_6\text{H}_{10}\text{Br}_2 \xrightarrow{\text{alc. KOH (3 eq.)}} \text{C}_6\text{H}_6 \, (\text{benzene}).\]
- Benzene contains 6 $\pi$ electrons.
2. Product B: Bromination followed by reaction with sodium hydroxide gives an enolate ion:
\[\text{C}_6\text{H}_{10}\text{Br}_2 \xrightarrow{\text{Na}^+/\text{O}^-} \text{O-CH}_2\text{CH=CH}_2.\]
- This product contains 2 $\pi$ electrons.
Total $\pi$ electrons: $6 + 2 = 8$