The Prophet (ﷺ) said: "If one of you does not know whether he prayed three or four…

Sunan an-Nasa'i Book 13 Hadith 61

Sunan an-Nasa'i #1239

The Book of Forgetfulness (In Prayer) 13:61

It was narrated from Abu Sa'eed Al-Khudri that:

The Prophet (ﷺ) said: "If one of you does not know whether he prayed three or four (rak'ahs), let him pray a rak'ah then prostrate twice after that when he is sitting. Then if he prayed five (rak'ahs), they (the two prostrations) will make his prayer even-numbered, and if he had prayed four, they will annoy and humiliate the shaitan."

Chapter: The praying person completing (the prayer) upon what he remembers when he doubts

Grade: Sahih (Darussalam)