In any level of baseball, a batter is allowed to bunt with 2 strikes. However, when a batter has 2 strikes and the bunt attempt results in a foul ball, the ball is ruled a strike and the at-bat is recorded as a strikeout.