How many pitches can a batter take without swinging before he walks or is called on strikes?

Five, a total of three balls and two strikes. The next pitch will either walk her, or put her out.