Abu Sa'id and Abu Huraira reported God’s messenger as saying that if anyone says “There is no god but God and God is most great”, his Lord will declare that he has spoken the truth, saying, “There is no god but me, and I am most great.” When he says, “There is no god but God alone who has no partner,” God says, “There is no god but me alone who has no partner.” When he says, “There is no god but God to whom belongs the dominion and to whom praise is due,” He says, “There is no god but me to whom belongs the dominion and to whom praise is due.” When he says, “There is no god but God, and there is no might and no power except in God,” He says, “There is no god but me, and there is no might and no power except in me.” He used to say that if anyone said these words in his last illness, hell would not devour him.
Abu Sa'id al-Khudri reported God’s messenger as saying that Moses asked his Lord to teach him something with which to make mention of Him or to supplicate Him, and was told to say, “There is no god but God.” He replied to his Lord that all His servants said this, but he wanted something particularly for himself, and He said, “Moses, were the seven heavens and their inhabitants apart from me and the seven earths put in one side of a balance and ‘There is no god but God’ in the other, ‘There is no god but God’ would outweigh them.”
Sa‘d b. Abu Waqqas said that along with the Prophet he once visited a woman in front of whom were some date-stones or pebbles which she was using as a rosary to glorify God. The Prophet suggested that he would tell her something which would be easier (or more excellent)* for her than that, and told her it consisted of saying, “Glory be to God as many times as the number of what He has created in the heaven; Glory be to God as many times as the number of what He has created in the earth; Glory be to God as many times as the number of what is between them; Glory be to God as many times as the number of what He is creating; God is most great (a similar number of times); Praise be to God (a similar number of times); There is no god but God (a similar number of times); There is no might and no power except in God (a similar number of times).”
*The transmitter was not sure whether "easier" or "more excellent" was used.
Tirmidhi and Abu Dawud transmitted it, Tirmidhi saying this is a gharib tradition.
Ibn ‘Abbas reported God’s messenger as saying, “The first to be summoned to paradise on the day of resurrection will be those who praise God in prosperity and adversity.”
Baihaqi transmitted the two traditions in Shu'ab al-iman.