Two inconsistent behaviours can be seen regarding the numbers display:
1 - Some units grey out the numbers on top of their head when they are not selected (villagers in the following example), but others keep them in full white (scouts).
2 - Some units display always the number on top of their head, even when not selected. Some units in the same control grup do not display it. Example showing a group of scouts in Control 1, when selected all show the number, when unselected only two of them show the number.
Edit: After further tests I have verified that the one not displaying the number it’s in fact the initial scout.