It is narrated from Hazrat Abu Saeed Khudri (may Allah be pleased with him) that the Prophet (peace and blessings be upon him) said: When any one of you is praying and does not remember how many rak'ahs he has prayed, he should act on what he is certain of, and then while sitting, perform two prostrations of forgetfulness (sujood as-sahw). Because if his prayer was odd, it will become even, and if it was even, it will be a humiliation for Satan.