How to deal with insinuating thoughts (waswas) from Satan causing doubts regarding number of rakaats among other things during Salaah?
Ignore the waswas and continue with your prayer. When that happens in prayer say: أعوذ بالله من الشيطان الرجيم and spit lightly to your left three times.
Uthman ibn Abi al-’Aas reported that he came to Allah’s Messenger (ﷺ) and said:
“O Allah’s Messenger, Satan intervenes between me and my prayer, and my reciting, and he confounds me. The Messenger of Allah (ﷺ) said: “That is a devil known as Khinzib and when you perceive him, seek refuge with Allah and spit three times to your left.” I did that and Allah dispelled him.” 
 [Sahih Muslim, 2203]< Back to Questions