When we speak about the early Hakhamim, we refer to them as the Sofrim, which means 'those who count'. The Gemara of Qiddushin (30a) tells us that they counted all the letters of the Torah. We believe that there is no unnecessary letter in the Torah. The Sofrim counted verses, words and letters in the Torah, and taught us pearls of wisdom through them. Through this act they brought much honor to the Torah, that is why they were honored with the title of Sofrim.
It is said about Rab Sa'adya Gaon, that he once asked his tailor, how many stitches he had stitched that day. The tailor responded by asking Sa'adia Gaon how many letters there were in the Torah. Sa'adya Gaon did not know the answer. He set about trying to count them, but try as he may, he failed. Finally, the answer was revealed to him by Heaven.
Why was Rab Sa'adya Gaon so troubled? The answer is that the amount of stitches a tailor uses is irrelevant, as long as it holds the garment together correctly. Each letter of the Torah, on the other hand, is worth thousands of pieces of gold. If one would meticulously count the amount of pieces of gold that one has, one should, all the more so, count the letters of the Torah. This brings great honor to the Torah.
(See Ben Ish Hayil, 1, Kallah 4)
the Sofrim, Each letter of the Torah is important, no unnecessary letter in the Torah, Sa'adia Gaon, Sa'adya Gaon