I have collected data from different sites and as per my knowledge, there were Five such Attempts.
First Attempt:
At the beginning of the fifth century (Hijra), the first attempt was made to transfer the bodies of Prophet Mohammad (SAWW) and His two companions from Madina to Egypt. This was ordered by Egyptian Fatami ruler Ba Amrullah. He sent Abu Al-Fatuh to carry out this plan.
Ibn Najjar wrote in his book “History of Baghdad”, Ba Amrullah hatched this plot to attract the attention of the world to Egypt and thus allowing the residents of Egypt to gain great respect. When Abu Al-Fatuh arrived in Madina, the residents of Madina came to know about his plot.
Second Attempt:
Ruler Ba Amrullah hatched a second plot but failed again. Ibn Saadoon has reported this in his book that Ba Amrullah sent some people to carry out his evil plans. These people started residing in a house near the Prophet’s Mosque and started digging an underground tunnel to reach the grave of the Prophet (SAS). During this, a fearful lightning struck the area and the following voice was heard, announcing very loudly, “Your Prophet’s grave is being dug!” The residents of Madina rushed out of their houses and started investigating. They got hold of the culprits and killed them all.
Third Attempt:
It took place in 557H (1164C). Samhoudi reported that the Christians made this plot very carefully to steal the body of the Prophet (SAWW).
There was a very pious ruler of Egypt at that time known as 'Sultan Nuruddin Zanki'. Three consecutive times in his dreams he saw Prophet (SAWW) pointing towards two persons. Sultan then reached Madina and after recognizing those two people ordered their execution.
Fourth Attempt:
Ibn Jubair has given details of this plot. This took place On 29th Dhul-Qaeda 578H by Christians from Syria. Their treacherous plan was to remove the body of the Prophet Mohammad (SAWW) from the Sacred Chamber. They announced it boldly and started heading towards Madina. When they were about one day’s journey away from Madina, the famous Hajib Luhluh came with his army, arrested these Christians, and killed some of them. They also sent some of these prisoners to other cities to be put to the sword. Some prisoners were sent to Makkah and Madina. The prisoners we (Ibn Jubair) saw were brought to Alexandria.
Fifth Attempt:
Al-Tabari, the famous historian, has described it as follows:
Shamsuddin Sawab Lamti was the head of the service personnel of the Prophet’s (SAWW) Mosque. Sawab said that he had a close friend who happened to be very close to the ruler of Madina. That friend informed Sawab that some people from Halb in Syria bribed the ruler of Madina and a big event is about to take place. Shortly afterwards, the ruler of Madina told Sawab, "Some people will knock at the door of the Prophet’s Mosque at night. Open the door for them and let them do what they want to do. Don’t interfere in any way." Later when those people came inside the mosque and when they had not yet even reached the pulpit when the earth split under their feet and they were buried with their equipment then and there.
Rest Allah (subhanahu wa ta'ala) knows the best.