On the authority of the son of 'Abbas (may Allah be pleased with them both), from the Messenger of Allah (may the blessings and peace of Allah be upon him), that among the sayings he related from his Lord (glorified and exalted be He) is that He said:
Allah has written down the good deeds and the bad ones. Then He explained it [by saying that] he who has intended a good deed and has not done it, Allah writes it down with Himself as a full good deed, but if he has intended it and has done it, Allah writes it down with Himself as from ten good deeds to seven hundred times, or many times over. But if he has intended a bad deed and has not done it, Allah writes it down with Himself as a full good deed, but if he has intended it and has done it, Allah writes it down a s one bad deed.
It was related by al-Bukhari and Muslim.
Subhanallah, such is the mercy of Allah!