Well, the first problem that you will have is properly defining the term “Caliph.” The Arabic word “Khalifah” literally just means successor and was used most appropriately to refer to Abu Bakr. His title was “Khalifatu Rasulillah,” or Successor of the Messenger of God.
Umar was the first to use the title “Commander of the Faithful” precisely because he was not a successor to the messenger, but a successor to Abu Bakr. He reportedly said, “How can I be called Successor of the Successor of the Messenger of God? This is too long. Rather, you are the faithful and I am your commander.” It has also been narrated that the suggested title was given by someone present in the court and not by Umar himself. Anyhow.
The appointment of each of the first four caliphs was different and shows that there is some flexibility when it comes to the issue of succession. Indeed, it is this very flexibility that caused most of the trouble that the early Islamic community faced. The sunni/shia split is the most popular example of this, but there were also splinter groups like the khawarij that emerged from the turmoil as well.
So, by claiming the title of “caliph” for themselves, the respective rulers and dynasties were seeking to legitimize their respective reigns by harkening back to the Prophet himself.
Still, there is a sunni narration that indicates that Muhammad said that only the “Rightly Guided Caliphs” were true caliphs.
Allah’s Messenger said: “The Caliphate will remain in my nation for 30 years and then kingship after that”. Saheeh Sunan At-Tirmidhee no. 2226
I personally am quite skeptical of such a narration, as it seems to have been deliberately fabricated to discredit rulers of the Umayyad and Abbasid dynasties. The fact of the matter is that Muhammad did not seem to come out clearly one way or another on the issue of his succession. The sunnis say that he appointed Abu Bakr to lead the prayers as he fell ill, saying that “Alllah and his prophet refuse anyone but Abu Bakr.” This, Sunnis say, shows that Muhammad intended for Abu Bakr to lead after him. The Shia say that he appointed Ali on his way back to Madinah at Ghadeer Khum. I’ve also read a so called “lost surah” that supposedly gives rights of succession to Ali, though I’m not sure if the Shia actually believe it.
In any event, early Islamic history was definitely a bloody mess. The most cynical may be inclined to view the whole thing as a tribal struggle between Bani Hashim and Bani Umayyah.