Narrated Ibn Abbas: The Prophet, peace be upon him, narrating about his Lord, said: “Allah ordered the good and the bad deeds be written (by angels), and He showed how.
If somebody intends to do a good deed and he does not do it, then Allah will write for him a full good deed (against his account). And if he intends to do a good deed and actually did it, then Allah will write (against his account) for him from ten to seven hundred times to many more times.
And if somebody intended to do a bad deed and he does not do it, then Allah will write a full good deed (against his account) with Him. And if he intended to do it (a bad deed) and actually did it, then Allah will write one bad deed (against his account).” (8: 498- O.B. Sahih Al-Bukhari)