The Rightly Guided Khalifa (Khalifa Rashed, The orthodox caliph) means a successorto the prophet Muhammad (pbuh). All muslims must obey the rightly guided khalifas as The Prophet (pbuh) said:
"Therefore, hold fast to my Sunnah and the Sunnah of the rightly guided Khalifas (Caliphs), hold it between your front teeth! And beware of innovations (in the religion), for every innovation is a bid'ah (bid3a), and every bid'ah is a deviation, and every deviation is in the Fire." (Bukhari & Muslim)
In order for someone to be a rightly guided khalifa he should maintain the following conditions:
He should follow the Sunnah so he should be very just too.
He should be from Quraish Tribe. this condition is not mandatory to be a normal Khalifa in this times (for example the Ottoman Caliphs) but it is a must to be counted among the 12 rightly guided khalifas as the prophet (pbuh) said.
Narrated by Jabir ibn Samurah: The Prophet (pbuh) said: The religion will continue to be established till there are twelve caliphs (Khalifas) over you, and the whole community will agree on each of them. I then heard from the Prophet (pbuh) some remarks which I could not understand. I asked my father: What is he saying: He said: all of them will belong to Quraysh.
All the muslim Ummah (nation) will agree on him as a khalifa. This does not mean that he should rule the whole Muslims' states. For example: Ali (may Allah be pleased with him) did not rule the whole muslims' state but they all agree that he is the khalifa.
He should be raised in Madina since the prophet (pbuh) said:
"The Khilafah (caliphate, succession) is in Madina and the dominion is in Damascus."
We see that Abu-Bakr, Umar, Uthmân, Ali, Abdullah bin Azzubair, and Umar bin Abdul-Aziz (may Allah be pleased with them all) all lived for a long time in Madina while Mu3awiya lived most of his life in Makka and Damascus so he is not among the rightly guided khalifas (Khulafa' Râshidun) but he is still a great and very just Khalifa.
As we see those strick conditions do not applay at anyone exept 12 people:
4. Ali: note here that all the Ummah agreed thet Ali is the khalifa. the disagreement between some of the Companians and Ali was about the political agenda of Ali not about the khilafah of Ali.
?. Abdullah bin Azzubair: probably he will not be counted here since not all the Ummah agree on him. Many Companians choosed Abdul-Malek bin Marwan as khalifa instead.
5. Umar bin Abdul-Aziz: A very just khalifa who lived most of his life in the Madina. All the Ummah agreed on him including the Shi3a and the Khawarej (although the Khawarej should not be counted as Muslims)
No one after Umar bin Abdul-Aziz can be considered as a rightly guided khalifa since the whole Ummah needs to agree on him. So, their are still 7 khalifas who did not apear yet. the Mahdi will be the last one of them.