What is required of one who doubts the number of rakʿāt during prayer?
All praise is due to Allah, and peace and blessings be upon our master the Messenger of Allah ﷺ.
If a person doubts the number of rakʿāt he has prayed, he should build upon the lesser number, as that is what he is certain of. He should then perform the prostration of forgetfulness (sujūd al-sahw) before the final salām at the end of the prayer. ʿAṭāʾ ibn Yasār narrated that the Messenger of Allah ﷺ said: "When any one of you is in doubt during his prayer and does not know whether he has prayed three rakʿāt or four, let him pray one more rakʿah and then perform two prostrations while seated before the salām. If the rakʿah he prayed was a fifth, these two prostrations will make it even; and if it was the fourth, then the two prostrations serve as a humiliation for the devil." (Reported by Abū Dāwūd.)
It is stated in al-Muqaddimah al-Ḥaḍramiyyah — one of the foundational texts of the Shāfiʿī school: "If one doubts whether he has prayed three rakʿāt or four, he is obliged to build upon the lesser number."
However, if such doubt recurs repeatedly and reaches the level of obsessive whispering (waswasah), he should not build upon the lesser number in that case — rather, he should build upon the greater number. And Allah the Almighty knows best.
What is the ruling on having an intention (Niyyah) for every prayer?
Praise be to Allah, and peace and blessings be upon our Master, the Messenger of Allah.
Intention (Niyyah) is a pillar (Rukn) without which the prayer is not valid. The worshiper must have an intention for every prayer, meaning they must consciously intend the act of worship they are performing. Its timing must coincide with the opening Takbir (Takbirat al-Ihram). It is not a requirement to utter it verbally; rather, doing so is considered a recommended Sunnah. There are three levels of intention:
1-If the prayer is obligatory (Fard): It is mandatory to include the Intent (to pray), the Specification (which prayer, e.g., 'Asr), and the Obligation (recognizing it as a Fard). For example, one should bring to mind or say: 'I intend to pray the Fard of 'Asr.'
2-If it is a voluntary prayer restricted by a specific time or cause (Sunnah Muqayyadah): It is mandatory to include the Intent and the Specification. For example: 'I intend to pray the Sunnah before Zuhr' or 'I intend to pray Duha.'
3-If it is an absolute voluntary prayer (Nafl Mutlaq): It is sufficient to simply have the Intent to pray. For example: 'I intend to pray.'
And Allah the Exalted knows best.
What is the ruling of Islamic Law on performing ṭawāf on the upper floors of al-Masjid al-Ḥarām, given that these floors are situated above the level of the Ka‘bah, and that the one performing ṭawāf passes by certain barriers, such as pillars and walls, during the ṭawāf?
All praise is due to Allah, and peace and blessings be upon our master, the Messenger of Allah ﷺ.
There are numerous conditions for the validity of ṭawāf (circumambulation around the Ka‘bah), among them: that the one performing ṭawāf be inside the Masjid (al-Masjid al-Ḥarām) — even if the Masjid has been expanded, so long as the expansion does not extend out into al-ḥill (land outside the sanctuary boundaries). It suffices for the ṭawāf to be performed in the airspace of the Masjid or upon its roof, even if that roof is higher than the Ka‘bah (the House) itself.
Al-Khaṭīb ash-Shirbīnī (raḥimahullāh) said: "It [ṭawāf] is valid upon the roof of the Masjid, even if the roof of the Masjid is higher than the House — just as prayer [is valid] upon Mount Abū Qubays despite its elevation above the House. This is the relied-upon (mu‘tamad) position." [Mughnī al-Muḥtāj, Vol.2/P.246]
The validity of the tawaf isn`t affected by the pillars and walls standing between the one performing ṭawāf and the House, since the condition is only that the person performing ṭawāf be within the boundaries of the Masjid and outside the boundaries of the Ka‘bah itself.
Ash-Shirbīnī said: "It [ṭawāf] is valid inside the Masjid, even if it is expanded, and even if a barrier stands between the one circumambulating and the House — such as a water-supply structure (saqāyah) or pillars (sawārī)." [Mughnī al-Muḥtāj, Vol. 2/P.246]
Accordingly, ṭawāf performed on the upper floors is valid, and the presence of barriers such as pillars and walls during the ṭawāf does not affect its validity. And Allah, the Exalted, knows best.
What is the ruling on doubting whether one or two prostrations were performed?
Praise be to Allah, and peace and blessings be upon our Master, the Messenger of Allah.
If a worshiper is in doubt regarding the number of units (rak'ahs) or prostrations (sajdahs) performed, he must build upon the minimum (i.e., assume the lower number) and perform the prostration of forgetfulness (Sujud al-Sahw) before the Salam at the end of the prayer. This is based on the report from ‘Ata’ ibn Yasar that the Messenger of Allah ﷺ said: 'When anyone of you is in doubt about his Salat (prayer) and does not know how many he has prayed, three or four (Rak'at) he should cast aside his doubt and base his prayer on what he is sure of. Then, he should perform two prostrations before Taslim (salutation). If he has prayed five Rak'at, they will make his Salat (prayer) an even number for him and if he has prayed exactly four, they (i.e. two prostrations) will be humiliation for the devil..' (Narrated by Abu Dawud).
It is stated in Al-Muqaddimah al-Hadramiyyah: 'If one doubts [whether he performed] a bowing (ruku’), a prostration, or a rak'ah, he must perform it and prostrate [for forgetfulness], even if the doubt is removed before the Salam—unless the doubt is removed before he performs what would potentially be an addition. Thus, if he doubts whether he prayed three or four, he is obligated to build upon the minimum.' And Allah the Exalted knows best.