If one swallows food that had remained in his mouth or in between his teeth while performing prayers, his prayer does not become invalid. Furthermore, there is no problem if a lump of sugar or sugar granules and suchlike remain in one’s mouth and gradually dissolve and are swallowed while one is performing prayers.
Eleventh: one has a doubt about the number of rakʿahs he has performed while performing a two rakʿah or three rakʿah prayer, or while performing the first two rakʿahs of a four rakʿah prayer, on condition that the doubt remains. Twelfth: one intentionally or inadvertently does not perform a rukn of the prayer, or intentionally does not perform an obligatory component of the prayer that is not a rukn, or intentionally adds one of the parts of the prayer.
Similarly, if one inadvertently adds a rukn like a rukūʿ or two sajdahs in the same rakʿah, his prayer becomes invalid based on obligatory precaution. As for inadvertently adding a takbīrat al‑iḥrām, this does not invalidate prayers.