Not sure how many rakaa you prayed?
Forgetting and confusion during prayer

If you are not sure how many rakaa you prayed, your prayer is not invalid: set the doubt aside, build on the number you are certain of (the lower one), finish the prayer and perform two prostrations of forgetfulness before the salam — unless you lean strongly toward one number, in which case you act on it.

You say the salam, and instead of calm there is a question: was that three or four? You replay the prayer in your head and the more you look for the answer, the less certain you get. If that is you, it is far more common than you think — and it does not mean your prayer was wrong.

Prayer Memory keeps the count for you, silently, so you can give your attention to the prayer instead of the number.

Last updated:

Why It Happens

Losing count is almost always a matter of attention, not memory. The movements of salah are familiar enough that the body performs them without supervision, and the moment your mind steps away — a noise from the next room, a thought about work, the sheer tiredness of Isha after a long day — the count is the first thing to go.

For some people it is also waswasa: repetitive, intrusive doubt that keeps asking the question no matter how clear the answer is. That is a different problem from an honest slip, and scholars treat it differently — the advice there is to stop chasing the doubt rather than to recount.

What to Do When It Happens

The hadith of Abu Sa’id al-Khudri (Sahih Muslim 571) gives the rule: when you doubt how many rakaa you have prayed, set the doubt aside, build on the number you are certain of — which is the lower one — complete the prayer, and perform sujood as-sahw (two prostrations of forgetfulness) before the salam. The prayer is not repeated and it is not invalid.

There is one widely-noted exception: if you have a stronger assumption (ghalib al-zann) about the correct number rather than a pure fifty-fifty doubt, most scholars say you act on it, and the prostration comes after the salam. The madhhabs differ on some of these details — the Hanafi school, for example, places sujood as-sahw after the salam in essentially every case. For the full breakdown, see the sajdah sahw guide.

Do You Repeat the Prayer if You Lose Count?

Usually not. What you do depends on when the doubt comes and how sure you are:

When to repeat the prayer after losing count of rakat
SituationRuling
You doubt while still prayingDo not repeat the prayer. Build on the number you are certain of (the lower one), finish, and perform sajdah sahw before the salam.
You lean strongly toward one number while prayingAct on that stronger assumption, finish, and perform sajdah sahw after the salam.
A mere doubt appears after the salamIgnore it. Nothing is required and the prayer is not repeated.
You become certain after the salam that a rakah was missed, soon afterPray the missing rakah, give the salam, and perform sajdah sahw (as in the hadith of Dhul-Yadayn).
You become certain of a shortfall after a long timeAsk a qualified scholar about your case; many scholars say to repeat the prayer.
You doubt almost every prayer (waswasa)Do not chase the doubt and do not recount. Carry on; speak to a scholar if it persists.

General guidance from widely cited hadith; the madhhabs differ on some details, so confirm with a scholar you trust for your own case.

How Prayer Memory Prevents It

The fix is simple: take the counting out of your head. You calibrate Prayer Memory once to your normal praying pace, and from then on your Apple Watch gives a short, silent haptic pulse at each rakaa — no sound, no screen, nothing anyone praying next to you would notice.

If you would rather count yourself, there is a manual rakaa counter on the iPhone, and a Taraweeh mode that keeps track of 12-rakaa prayers on long Ramadan nights. Everything works offline, with no account, and your prayer history stays on your device.

Either way, the answer to “was that three or four?” is already on your wrist. Prayer Memory is on the App Store and Google Play.

Frequently Asked Questions

Never lose count in salah again

Prayer Memory is free to download, and the first month of Pro (the automatic counter for the five prayers) is free.