SHAFAQNA – Zurarah and Abu Basir narrated: We told him (meaning Imam Baqir (AS) or Imam Sadeq (AS)) that a man doubts a lot in his Salaat, to the extent that he does not know how many Rok’ats he has performed and how many is left? Imam (AS) replied: Perform it again. They said: In fact, in many occasions, when he performs it again, he doubts about it. Imam Replied: He should not pay attention to his doubt. Then, Imam (AS) said: Do not accustom that evil to your breaking of Salaat, in order to make the Satan greedy. Because Satan is evil and gets used to a thing that has become accustomed. Meaning; indeed any of you (must) ignore his/her doubt and do not break the Salaat a lot, because if you do so, your doubt will return. Satan wishes to be obeyed; therefore, when he is disobeyed, will not return to any of you [1].
[1] Sharhe Chehel Hadith, Imam Khomeini (RA), Page 406.