Massive star populations in Wolf–Rayet galaxies