When the ball contacts the batter, it is a dead ball. Now, the umpire must judge if the batter attempted to swing at the pitch or not. If he did not, it is a hit by pitch and he receives first base. If he attempted to strike the ball, it is a strike. If the count was 0-2, the kid who just got hit while attempting to hit the ball is out on strikes. stinks for him.