It so happens that when I join the prayer late, I forget how many rak’ahs had been done when I joined and how many are left for me to make up, and when I am sure that three or more people have come after me and joined the row with me at the same time… My question is: is it permissible to follow their example with regard to the remaining rak’ahs, especially since it is unlikely that a number of people would forget in the same manner?
Praise be to Allaah.
In the case of doubt as to the number of rak’ahs, one should act on the basis of what is certain, so he should assume the smaller number of rak’ahs. So if he acts according to what is more likely, i.e., what he thinks is most likely to be the case, even by looking at those who are next to him, there is nothing wrong with that, provided that he does sujood al-sahw (prostration of forgetfulness) in either case.
Shaykh ‘Abd al-Kareem al-Khudayr.