Caveat: Luke Appling, who played for the Chicago White Sox from about 1930 to 1950, is the frontrunner. His anecdotal pitch counts range from 19 up to 24. One at bat went like follows: 4 fouls, one ball, 6 fouls, one ball, 14, yes fourteen (!) fouls, and then 2 more balls for a walk.
The Baseball Guru also went with Appling, mentioning that he once fouled off 15 pitches against Bob Feller in 1940. Pat Listach took 17 pitches before getting a walk in a 1992 baseball game.