No researcher who has studied the biography of the Prophet, and who become familiar with the Islamic history, doubts the fact that the Prophet was the one who appointed the Twelve Imams, clearly stating so in order that they might succeed him and take charge of his nation. Their number is mentioned in the Sahih books of Ahlul Sunnah together with the fact that they were twelve in number, and that all of them descended from Quraysh; this is what al-Bukhari and Muslim, as well as many others, have confirmed.
Some Sunni references indicate that the Prophet named all of them, saying that the first of them was Ali ibn Abu Talib, followed by his son al-Hasan then al-Hasan's brother al-Husayn, followed by nine from the offspring of al-Husayn the last of whom is al-Mahdi. The [Sunni] author of Yanabi’ al-Mawaddah narrates the following incident in his book:
A Jew named al-A`tal came to the Prophet and said, “Muhammad! I wish to ask you about certain things which I have been keeping to myself; so, if you answer them, I shall declare my acceptance of Islam before you.” The Prophet said, “Ask me, O father of Imarah!” So he asked him about many things till he was satisfied and admitted that the Prophet was right. Then he said, “Tell me about your wasi (successor): who is he? No prophet can ever be without a wasi; our prophet Moses had appointed Yusha` [Joshua] son of Noon as his successor.” He said, “My wasi is Ali ibn Abu Talib followed by my grandsons al-Hasan and al-Husayn followed by nine men from the loins of al-Husayn.”
He said, “Then name them for me, O Muhammad!” The Prophet said, “Once al-Husayn departs, he will be succeeded by his son Ali; when Ali departs, his son Muhammad will succeed him. When Muhammad departs, his son Ja`far will succeed him. When Ja`far departs, he will be succeeded by his son Musa. When Musa departs, his son Ali will succeed him. When Ali departs, his son Muhammad will succeed him. When Muhammad departs, his son Ali will succeed him. When Ali departs, his son al-Hasan will succeed him, and when al-Hasan departs, al-Hujjah Muhammad al-Mahdi will succeed him. These are the twelve ones.”
That Jew, therefore, embraced Islam and praised Allah for having guided him. If we wish to turn the pages of Shi`a books and discern the facts they contain with regard to this subject, we will surely find many times as many ahadith as this one, but this suffices to prove that the scholars of “Ahlul Sunnah wal Jama’ah” admit that the number of the Imams is twelve, and there are no such Imams besides Ali and his purified offspring. What strengthens our conviction that the Twelve Imams from Ahlul Bayt were never tutored by any of the Ummah's scholars is the fact that no historian, nor traditionist, nor biographer, has ever narrated saying that one of the Imams from Ahlul Bayt learned what he knew from some sahabah or tabi’in as is the case with all the Ummah's scholars and Imams.