Shuʿayb—and likewise Ibn Abī al-Zinād—gave the number as ninety, and that wording is sounder; al-Bukhārī alone recorded it through this line of transmission (1).
Abū Yaʿlā said: “Zuhayr narrated to us; Yazīd narrated to us; Hishām ibn Ḥassān informed us, from Muḥammad, from Abū Hurayrah, who said: The Messenger of Allah ﷺ said:
‘Solomon son of David declared, “Tonight I shall go around to a hundred women; each one of them will give birth to a boy who will wield the sword in the cause of Allah.” Yet he did not say, “If Allah wills.” That night he went around to the hundred women, but none of them conceived except one, and she delivered a child whose body was only half-formed.’
The Messenger of Allah ﷺ added, ‘Had he said, “If Allah wills,” every one of them would have borne a son who would wield the sword in the cause of Allah ﷻ.’”
Its chain of transmission meets the conditions of the two Ṣaḥīḥs, though they did not record it by this route (2).
Imām Aḥmad said: “Hushaym narrated to us; Hishām narrated to us, from Ibn Sīrīn, from Abū Hurayrah, who said: Solomon son of David said, ‘Tonight I will go around to a hundred women; each of them will bear a boy who will fight in the path of Allah,’ but he gave no exception. None of them bore a child save one, and she produced a half-formed human being. The Messenger of Allah ﷺ said, ‘Had he made the exception, a hundred boys would have been born to him, all of them fighting in the cause of Allah ﷻ.’” Aḥmad alone recorded this version as well (3).
Imām Aḥmad also said: “ʿAbd al-Razzāq narrated to us; Maʿmar related to us, from Ibn Ṭāwūs, from his father, from Abū Hurayrah, who said: The Messenger of Allah ﷺ said:
‘Solomon son of David said, “Tonight I will go around to a hundred women; each woman will give birth to a son who will fight in the cause of Allah.”’ He forgot to say, ‘If Allah wills,’ yet he went around to them. None of them conceived except one, who delivered a half-formed human being. The Messenger of Allah ﷺ remarked, ‘Had he said, “If Allah wills,” he would not have broken his oath, and his objective would have been attained.’” (4)
Al-Bukhārī and Muslim likewise included this wording in their two Ṣaḥīḥs, narrated from ʿAbd al-Razzāq, exactly as above (5).
Isḥāq ibn Bishr reported: “Muqātil informed us; from Abū al-Zinād, and Ibn Abī al-Zinād from his father, from ʿAbd al-Raḥmān, from Abū Hurayrah: Solomon son of David had four hundred wives and six hundred concubines. One day he said, ‘Tonight I will go around to a thousand women, and each of them will conceive a horseman who will strive in the cause of Allah.’ Yet he did not make the exception. He went around to them, and none conceived except one woman, who gave birth to only half a human being. The Prophet ﷺ said, ‘By the One in Whose hand is my soul, had he added the exception and said, “If Allah wills,” what he foretold—horsemen—would indeed have been born, and they would have fought in the cause of Allah ﷻ.’”