This Hadith adds on to the one you mentioned:
“Hazrat Hudhayfah ibn al-Yamanra narrates that the Holy Prophetsa said, ‘Prophethood shall remain among you for as long as Allah decides for it to remain and then Allah shall lift it when He decides to lift it. After prophethood, there shall be khilafat on the way of prophethood (خلافة على منهاج النبوة) and it shall exist for as long as Allah decides for it to exist. Then He will take away (this blessing) when He decides to take it away. Then, (as per His decree), there will be a mordacious monarchy (ملكا عاضا) (under which people will feel dejected and oppressed) […] (Once that period has come to an end, as per His other decree), there will be an even more severe form of tyrannical despotism (ملكا جبرية), until (the mercy of Allah will be moved and) He will bring an end to that period (of oppression and persecution) […] Then khilafat on the way of prophethood (خلافة على منهاج النبوة) shall be established once again.’ Thereafter, he remained silent. (Musnad Ahmad ibn Hanbal, Vol. 6, Musnad Nu‘man ibn Bashir, Hadith 18596, Beirut: ‘Alam Al Kotob, 1998, p. 285)
So the Holy Prophet (sa) gave an overview of the politics of the future (khilafat -> monarchy -> despotism -> khilafat) and gave the glad tidings that once again there would be Khilafat on the way of Prophethood.
Since Mua'wiya (ra) fought against Ali (ra) and went against the tradition of election and appointed his own son as his successor, we would consider his rule to be as kingship.
Regardless, since Holy Prophet (sa) said Khilafat would last 30 years, and Mua'wiya's (ra) rule is beyond that time frame, it would not be considered as a Khilafat, regardless of what people say
Whether the Rashidun Khilafat was in reality 29 or 30 years long IMO is meaningless. Because in the grand scheme of things it's basically the same and the prophecy remains fulfilled.