Hadith 189
Sayyiduna Abdullah bin Mas'ud, may Allah be pleased with him, says: The Messenger of Allah, peace and blessings be upon him, said: "When any one of you begins to doubt and does not know how many units of prayer he has performed, then he should reflect until he becomes certain, then he should complete according to what is in his heart, and perform two prostrations of forgetfulness (sujood as-sahw)."