Abū Dāwūd also narrated it (2/207), by way of Ismāʿīl ibn Abī Khālid, from his father, from Jābir, with the wording:
“This religion will remain established until there are twelve caliphs over you, all of them from Quraysh, and the Ummah will unite upon every one of them.”
This is a weak chain of transmission. All its narrators are trustworthy except this Abū Khālid. Al-Dhahabī said: “No one narrated from him other than his son.” Al-Tirmidhī nevertheless authenticated a report through him, while al-Taqrīb states that he is acceptable—that is, weak in hadith.
I say: He alone narrated this clause: “and the Ummah will unite upon every one of them.” The hadith has also been related through other routes, with wording similar to that cited above in Muslim, al-Tirmidhī, and al-Musnad (5/107). It also has a corroborating report from the hadith of Ibn Masʿūd, narrated by Mujālid from al-Shaʿbī, from Masrūq, who said:
“We were sitting with ʿAbd Allāh ibn Masʿūd while he was teaching us the Quran, when a man said to him: ‘O Abū ʿAbd al-Raḥmān, did you ask the Messenger of Allah, peace and blessings be upon him, how many caliphs will rule this Ummah?’
ʿAbd Allāh ibn Masʿūd replied: ‘No one has asked me about this since I came to Iraq before you. Yes, we did ask the Messenger of Allah, peace and blessings be upon him, and he said: “Twelve, equal to the number of the chiefs of the Children of Israel.”’”