Sayyiduna Ibn Abbas (may Allah be pleased with them both) said: Thirty-nine men and one woman accepted Islam with the Prophet (peace and blessings be upon him), then with the Islam of Sayyiduna Umar (may Allah be pleased with him) the number became a full forty. So Allah, the Mighty and Majestic, revealed this verse: "O Prophet, Allah is sufficient for you, and those of the believers who follow you" [Al-Anfal: 64].
Hadith Referenceالمعجم الكبير للطبراني / باب العين / 12417