Shaykh Abdul Sattar al-Hammad
Hadith Commentary:
In this hadith, the number of the Companions of the Tree (Ashab al-Shajarah) is stated as fourteen hundred.
Whereas earlier, in the narration of Bara’ bin Azib radi Allahu anhu, it was mentioned that their number was more than fourteen hundred.
In one narration, it is fifteen hundred, and in another, it is thirteen hundred.
The way to reconcile these is that the number of the noble Companions radi Allahu anhum was more than fourteen hundred.
Some narrators, according to the custom of the Arabs, did not count the additional fraction.
They reported it as fourteen hundred, and some, by counting the additional fraction in full, stated it as fifteen hundred. As for the narration in which it is thirteen hundred, it is possible that the narrator counted only that many, while another counted all, and the addition of a trustworthy narrator is accepted.
It is also possible that Abdullah bin Abi Awfa radi Allahu anhu counted them when they set out from Madinah Tayyibah, so at that time they were only thirteen hundred; along the way, a hundred more joined, thus their number became fourteen hundred. Besides this, if servants and women were counted, the number may have reached fifteen hundred.
(Fath al-Bari: 7/549)
And Allah knows best.
In the last hadith, it is mentioned that there were individuals from the tribe of Aslam; in this regard, the number of the Muhajirun is eight hundred, and the rest would be the Ansar.
(Fath al-Bari: 7/554)
Source: Hidayat al-Qari: Commentary on Sahih Bukhari, Urdu, Page: 4154