It is narrated from Hazrat Abu Huraira (may Allah be pleased with him) that the Noble Prophet (peace and blessings be upon him) said: When any one of you is praying, Satan comes to him and confuses him, so much so that he does not remember how many rak'ahs he has prayed. Whoever experiences this should, when he sits in the final sitting (qa'dah akheerah), perform two prostrations of forgetfulness (sajda sahw).