Nawafil may be divided into two types: general and specific prayers. The nawafil are said to be those prayers which are in addition to the fard salah, as prayed by the Prophet sallallahu alehi wasallam.
An-Nawawi says: “If one decides to make nawafil prayers and he does not make any intention concerning the number [of rak’at] he shall make, then he may end the prayer after one rak’ah or make it two rak’at or increase it to three or one hundred or one thousand, and so forth. If he prays a number of [rak’at], without knowing how many, and then ends the prayer his salah will still be valid.” There is no difference of opinion on this. The Shaf’iyyah are in agreement with it and there is a text attributed to ash-Shaf’i on this point.
Al-Baihaqi records with a chain of narrators, that Abu Zharr prayed many rak’at and then concluded his salah. Al-Ahnaf ibn Qais asked him: “Do you know if you finished on an odd or an even number?” He replied: “Even if I do not know, Allah knows. I heard my friend Abu al-Qasim say: ‘No slave makes a sajdah to Allah without Allah raising him a degree and wiping out one of his sins due to it.”‘ This is related by ad-Darimi in his Musnad with a sahih chain, but it should be noted that there is a difference of opinion over the integrity of one of its narrators.
The specific nawafil prayers are referred to as al-sunan ar-ratibah, or the sunnah prayers that have a specific order, number, and so on. These include the sunnah prayers of fajr, zuhr, ‘asr, maghrib, and ‘isha.