How many times does a form of the word מלאכה appear in the Torah? (Shabbos 49b)
Todays's daf (Shabbos 49b) attempts to find a source for the idea that there are 39 melachos on Shabbos. The Gemara says that the various forms of the word מלאכה appear in the Torah 39 times.
However, there is a big problem. In actuality the various forms of the word מלאכה appear 65 times in the Torah. Many of the Rishonim in Shabbos quote R' Chananel that it appears 61 times and they are bothered by this obvious contradiction.
The Rishonim and Acharonim give a number of answers:
1. R' Chananel (quoted by the Ramban, Rashba and others) - The Gemara only counts the word מלאכה when it is written in the context of an act that is forbidden on Shabbos. This excludes things like מלאכה when described in Bereishis, etc. This also excludes all the references to מלאכת עבודה by Yom Tov since all 39 מלאכות are not prohibited on Yom Tov. According to this, the number of remaining appearances of the word מלאכה is thirty-nine if you start with 61 (see above). However, this is very difficult as we know that מלאכה really appears 65 times and therefore we are left with 43 not 39.
2. The תוספות יום טוב (Shabbos 7:2) explains that the Gemara excludes all appearances of the word מלאכה that appear in the context of לא תעשה מלאכה. The תוספות יום טוב claims that the count, not including all of these, comes to a total of thirty-nine. However, this is simply not true as the תוספות יום טוב missed a few occurrences.
3, The מראה פנים says that the word מלאכת is not included in the count, however, this is difficult for a number of reasons. Firstly it does not get the count down to 39, secondly the Gemara explicitly says that מלאכת is included in the count.
This is one of those very difficult Gemaras which seems to imply that the text of the Chumash that we have is not even word perfect with that of the Amoraim and Rishonim (R' Chananel's 61 versus our 65 versus's the Gemara's 39). In fact, R' Akiva Eiger (Shabbos 55a) collects over 20 cases from all over Shas, medrashim, etc. where our mesora differs from either Chazal's or the Rishonim (see Does our sefer torah have an extra letter(s)? for more).