Rule 10.17(b) With two strikes on the batter only a strike out counts against the previous batter. All other results accrue to the Pinch Hitter. The number of outs at the time is irrellevant.
"When A batter leaves the game with two strikes on him, and the substitute batter completes a strikeout, charge the strikeout and the time at bat to the first batter. If the substitute batter completes the turn at bat in any other manner, including a base on balls, score the action as having been that of the substitute batter."