Maseches Makkos, chapter 3, mishnah 10. The mishnah now turns to the details of how the lashes are actually administered, and it opens with the most basic question: how many lashes are given?
The number of lashes:
The mishnah rules: "arba'im chaser achas" - forty less one, thirty nine, "shene'emar: b'mispar arba'im" - as it says, "by number, forty."
Why are forty lashes not given? The Gemara derives this from the precise wording of the verse: had the Torah wanted him to receive forty, it would have said "arba'im b'mispar" - that forty is the number itself. Since it said "b'mispar arba'im," the wording indicates the number that leads up to forty, the number immediately adjacent to it - and therefore thirty nine.
The opinion of Rabbi Yehudah:
Rabbi Yehudah disagrees and takes the verse according to its plain reading: "arba'im sheleimos hu lokeh" - he receives a full forty lashes, just as the Torah states, and he does not accept this derivation.
Where the lashes are given and the question of the extra lash:
In mishnah 13 we will learn that the lashes are divided into three parts:
Thirteen lashes on one side of his back.
Thirteen lashes on the other side of his back.
Thirteen lashes on his chest.
According to the first opinion, the thirty nine lashes divide evenly into three equal parts. But according to Rabbi Yehudah, who holds that there are forty, the question arises: "v'heichan hu lokeh es hayeseirah" - where is the extra lash, the fortieth, given, since it does not divide into three?
To this the mishnah answers: "bein k'seifav" - one lash exactly in the middle, between his shoulders.
In summary: in this mishnah we learned the number of lashes - forty less one, derived from the precise wording "b'mispar arba'im," which indicates the number adjacent to forty; and the opinion of Rabbi Yehudah, that he receives a full forty, and accordingly the extra lash is given between his shoulders.