Yes.
However, rules state a pitcher must pitch one complete at bat before being taken out of the game (unless the pitcher gets injured and cannot continue). So, as long as the batter being pitched to is not the first batter the pitcher is facing, the pitcher may be removed in the middle of the count.
Chat with our AI personalities
Yes, pitchers and hitters can be substituted at any time.
Hitters can be substituted at any time, but unless he is injured, a pitcher must pitch to at least one batter before he can be taken out. A pitcher can be removed in the middle of an at-bat, however, if he had pitched to at least one hitter previously.