The famous Prophetic narrations of ’12 Caliphs’ or ’12 Emirs’ are mentioned in many books of Hadith including Sahih Bukhari and Sahih Muslim:
يَكُونُ اثْنَا عَشَرَ أَمِيرًا – فَقَالَ كَلِمَةً لَمْ أَسْمَعْهَا فَقَالَ أَبِى إِنَّهُ قَالَ – كُلُّهُمْ مِنْ قُرَيْشٍ.
Jaber Ibn Samorah said I went to the Prophet (P) and I heard him saying: “There will be 12 Emirs”- then the Prophet (P) said something that I did not hear so I asked my father about it and he said, the Prophet (P) added: “they are all from Qoraysh.” (Bukhari, Hadith No. 7222).
عَنْ جَابِرِ بْنِ سَمُرَةَ قَالَ دَخَلْتُ مَعَ أَبِي عَلَى النَّبِيِّ صَلَّى اللَّهُ عَلَيْهِ وَسَلَّمَ ، فَسَمِعْتُهُ يَقُول: إِنَّ هَذَا الْأَمْرَ لَا يَنْقَضِي حَتَّى يَمْضِيَ فِيهِمْ اثْنَا عَشَرَ خَلِيفَةً . قَالَ : ثُمَّ تَكَلَّمَ بِكَلَامٍ خَفِيَ عَلَيَّ . قَالَ : فَقُلْتُ لِأَبِي : مَا قَالَ ؟ قَالَ : كُلُّهُمْ مِنْ قُرَيْشٍ.
Jaber Ibn Samorah said I went to the Prophet (P) and I heard him saying: “Indeed this matter will not be completed until there will be 12 Caliphs amongst them.” He then added something softly that I did not hear, so I asked my father about it who said: The Prophet (P) said: “They are all from Qoraysh.” (Muslim, Hadith No. 1821, Book of leadership).
The above narration has been one of the most mysterious narrations for Sunni scholars. Al-Nawawi; the most famous interpreter of Sahih Muslim, who while quoting from many scholars regarding the meaning of the abovementioned Hadith, quotes from al-Qadi A’yadh who suggested:
و يحتمل أن يكون المراد مستحقي الخلافة العادلين ، وقد مضى منهم من عُلم ، ولا بد مِن تمام هذا العدد قبل قيام الساعة
“And it is possible that it is meant for those just people who deserve the Caliphate, and some of them who are known have already passed and the rest must come before the Resurrection Day.” (Sharh Muslim vol.12 p.202)
Ibn Kathir; the famous Sunni Imam of Hadith and historian says:
ومعنى هذا الحديث البشارة بوجود اثني عشر خليفة صالحًا ، يقيم الحق ويعدل فيهم ، ولا يلزم من هذا تواليهم وتتابع أيامهم ، بل قد وجد منهم أربعة على نَسَق ، وهم الخلفاء الأربعة: أبو بكر ، وعمر ، وعثمان ، وعلي ، رضي الله عنهم ، ومنهم عمر بن عبد العزيز بلا شك عند الأئمة ، وبعض بني العباس. ولا تقوم الساعة حتى تكون ولايتهم لا محالة ، والظاهر أن منهم المهدي المبشر به في الأحاديث الواردة بذكره
“This Hadith is a glad tiding that there will be 12 righteous Caliphs (after the holy Prophet), who will establish truth and justice. However, it does not necessarily mean they should lead one after the other! Thus among them it could be undoubtedly Omar Ibn Abdul-Aziz, and some of the Abbasid kings! (In any event), the Resurrection Day will not happen until they (the 12 Caliphs) undoubtedly rule. And apparently al-Mahdi; whose glad tiding has been mentioned in many narrations is one of them!” (Tafsir Ibn Katheer, vol.3, p.65).
Ibn Hajar; the author of Fathul-Bari, whose book is celebrated as one of the best interpretations of Sahih Bukhari, while quoting from al-Mohallab says:
لم ألق أحدا يقطع في هذا الحديث يعني بشيء معين
“I have not met anyone who could be certain about the meaning of this Hadith!” (Fathul-Bari, vol. 13, p.211)
Similarly, Ibn Jouzi; the renowned Hanbali scholar confesses:
هذا الحديث قد أطلت البحث عنه، وتطلّبت مظانّه، وسألت عنه، فما رأيت أحدا وقع على المقصود به
“I have researched for long to understand this Hadith and referred to many references and made much enquiries about it, yet I did not meet anyone who could understand it.” (Kashful-Majhool, vol.1 p.449)
Likewise, Ibn Taymiyya says:
ومنهم من قال: لا أفهم معناه كأبي بكر بن العربي
“Among them (scholars) are those like Abi-Bakr Bin Arabi who said: “I do not understand the meaning of the Hadith!” (Menhaju-Sunna, vol. 8 p.173)
It doesn't matter which way you look at it or what meaning you take from it, one thing is for certain that the number 12 is most definitely certain and popular. And that is something you can't take away from the Shias. They've definitely got the number right. 😊