The World Federation One Stop Fiqh

Ruling 1208

If a person doubts whether he has performed two, three, or four rakʿahs, and after performing two rakʿahs of ṣalāt al-iḥtiyāṭ in a standing position he remembers that he had actually performed two rakʿahs, it is not necessary for him to perform two rakʿahs of ṣalāt al‐iḥtiyāṭ from a sitting position.