Of course that doesn’t count !
Must admit it does mar the game and refs should wake up to it.
I think that when substitutions are made that the player should walk off the pitch at the nearest point to him and when he does then the other player comes on.
The subbed player can then just walk...