It has become my bad habit to doubt whether i prayed three or four rakats. Actually i think i don’t forget but fear that i will forget. Then i start doubting. What should i do ?
Wa’alaykum as Salam wa rahmatullahi wa barakatuhu,
Firstly, you should try your best to clear your mind and concentrate fully in Salah.
If after trying to keep focus, if these doubts come after you completed the prayer, then just ignore them
However, if these doubts occur whilst you are praying, then since you frequently lose count on the amount of Rakahs, you should first apply your mind and base your Rakahs on whatever you are more inclined towards. So for example, you doubt whether you are in your third or fourth Rakah, but after thinking for a moment, you are more inclined to believe that you are in your fourth Rakah, then you should consider it as your fourth Rakah. In this case there will not be any need for Sajda Sahw (prostration of forgetfulness)
If you can really not decide, then you should work on the lesser amount of Rakats. For example, your doubt whether you are in your third or fourth Rakah, and you really cannot make up your mind, then assume it as your third Rakah. In this case, you will have to do Sajda Sahw. However, this becomes abit more tricky…since you are unsure, and you are working on the lesser amount, it is possible that you are wrong. Hence, in spite of now continuing the prayer as if you are in the third Rakah, you will still sit for Tashahhud after the second Sajda of this Rakah (although you considered it as your third), since it is possible that this actually is your fourth Rakah. After the Tashahhud, you stand up for the fourth Rakah, and continue the prayer as normal, with Sajda Sahw at the end.
And Allaah Ta’aala knows best
Ismail Moosa (Mufti)
عن أبي سعيد الخدري قال قال رسول الله صلى الله عليه وسلم * إذا شك أحدكم في صلاته فلم يدر كم صلى ثلاثا أم أربعا فليطرح الشك وليبن على ما استيقن ثم يسجد سجدتين قبل أن يسلم فإن كان صلى خمسا شفعن له صلاته وإن كان صلى إتماما لأربع كانتا ترغيما للشيطان (أخرجه مسلم في صحيحه – (1/ 400)
This answer was collected from Fatwaa.com which is an excellent Q&A site managed by Mufti Ismail Moosa from South Africa. .