To reproduce:

1. Have more than one unit of a certain type. (Say, I have 3 treants as Nature's Prophet.)
2. Place not all of them in one control group (In this example, treant 1 and treant 2 in group 1, treant 3 in group 2).
3. Disconnect.
4. Reconnect.
5. Select control group 1.
6. Count the treants. All of them are in the group because the game's AI thinks to be 'helpful' and add all of them even if you explicitly selected a few of them.