The Fardh - obligatory rakats of Isha is 4 and a total of 17 rakats: 4 sunnat, 4 fard, 2 sunnat, 2 nafl, 3 witr, 2 nafl
The Isha prayer is one of the five mandatory salah (Islamic prayer). Isha prayer is a four rakah prayer. There are a few optional prayers that can be recited after the Isha prayer, including the Nafilat ul-Layl prayers
The 4 Sunnat is sunnah ghair muakkadah (less emphatic sunnah) like the one before asr , so some people do not pray it and begin with the 4 fard. The nafl rakats are also optional. Of course, it is recommended to do the nafl and sunnah ghair muakkadah rakats. The 3 witr is prayed by some as 1 witr too.
Fardh - obligatory someone who ignores Fardh intentionally, knowing that it is an obligation, becomes a kaafir (disbeliever) (that is the opinion of most scholars)
Wajib - necessary (although less than Fardh) someone who ignores Wajib does not become a disbeliever but he is sinning nonetheless.
Sunnat muakkadah - those actions of Hazrat Muhammad (ﺻﻠﯽ الله ﺗﻌﺎﻟﯽٰ ﻋﻠﯿﮧ ﻭﺍٓﻟﮧ ﻭﺳﻠﻢ) (peace be upon him) that were done regularly. someone who leaves it out due to a valid reason will not be sinning but who doesn t have a valid reason will be sinning.
Sunnat-e-Ghair-Muakkadah- those actions of Hazrat Muhammad (ﺻﻠﯽ الله ﺗﻌﺎﻟﯽٰ ﻋﻠﯿﮧ ﻭﺍٓﻟﮧ ﻭﺳﻠﻢ) (peace be upon him) that were not done regulary. leaving it out for no reason at all doesn t mean the person is sinning although he will miss out on the extra reward.
Nafl - optional.
Time: The time for Isha starts after Maghrib and lasts till Fajr has started.
It is better to pray witr separately and at the end of the night as said in the hadith:
The Messenger of Allaah (peace and blessings of Allaah be upon him) said: “Whoever fears that he will not get up at the end of the night, let him pray Witr at the beginning of the night, but whoever thinks that he will be able to get up at the end of the night, let him pray Witr at the end of the night, for prayer at the end of the night is witnessed (by the angels) and that is better.” Narrated by Muslim, 755
Narrated by Anas bin Sirin that he asked Sayyidina Ibn Umar (RA) if he may lengthen the two rakat of fajr. He said, The Prophet prayed in the night in two s and (finally) one rakah of witr. And offered the two rakat (of fajr) with the adhan in his ears." [Bukhari 995, Muslim 749, Ibn e Majah
As for the number of witr rakahs Witr is one rak ah at the end of the night.” Narrated by Muslim, 752.
And he (peace and blessings of Allaah be upon him) said: “The night prayers are two (rak’ahs) by two, but if one of you fears that dawn is about to break, let him pray one rak’ah to make what he has prayed odd-numbered.” Narrated by al-Bukhaari, 911; Muslim, 749
narrated by ‘Aa’ishah (may Allaah be pleased with her) who said: The Messenger of Allaah (peace and blessings of Allaah be upon him) used to pray thirteen rak’ahs at night, praying five rak’ahs of Witr, in which he would not sit except in the last rak’ah. Narrated by Muslim, 737.
And Allah knows best