To understand the rules about doubt during one's prayers, it is first important to know…
What should one do when having doubts during four-unit prayers?
We may sometimes experience doubts between rakats (units) of prayer. For example, “Did I perform 2 rakats or 3?” Or, “Is this my 3rd rakat or 4th?” We might think it necessary to start our prayers again in such doubtful conditions.
According to the edicts of al-Sayyid al-Sistani, certain cases may be remedied without invalidating prayer, while others require prayer to be re-performed.
I.M.A.M. has prepared a concise infographic (below) for easy understanding of what to do when facing doubts during four-unit prayer.The-Rules-of-Doubt-in-4-Unit-Prayers-Chart-WSG