The regular Sunnah prayer of Maghrib is two rak’ahs only. See the answer to question no. 1048.
But there is a report concerning the virtue of praying six rak’ahs after Maghrib. Al-Tirmidhi (435) and Ibn Majaah (1167) narrated that Abu Hurayrah (may Allaah be pleased with him) said: The Messenger of Allaah (peace and blessings of Allaah be upon him) said: “Whoever prays six rak’ahs after Maghrib and does not say anything bad in between them, will have a reward equal to the worship of twelve years.”
Al-Tirmidhi said: This hadeeth of Abu Hurayrah is a ghareeb hadeeth which we know only from the hadeeth of Zayd ibn al-Hubaab from ‘Umar ibn Abi Khath’am. I heard Muhammad ibn Ismaa’eel [al-Bukhaari] say: ‘Umar ibn ‘Abd-Allaah ibn Abi Khath’am is munkar al-hadeeth (i.e., his hadeeth is to be rejected), and he classed it as da’eef jiddan (very weak).
Al-Albaani (may Allaah have mercy on him) said in Da’eef al-Tirmidhi: It is da’eef jiddan (very weak).
There are other ahaadeeth which encourage praying between Maghrib and ‘Isha’, but they are all weak.
See: Da’eef al-Targheeb wa’l-Tarheeb (332, 333, 334, 335).
But it is proven that the Prophet (peace and blessings of Allaah be upon him) did pray between Maghrib and ‘Isha’.
Ahmad (22926) narrated that Hudhayfah (may Allaah be pleased with him) said: I came to the Prophet (peace and blessings of Allaah be upon him) and prayed Maghrib with him. When he had finished the prayer, he stood and prayed, and he kept praying until he prayed ‘Isha’. Classed as saheeh by al-Albaani in Irwa’ al-Ghaleel (470).
It is also proven from some of the Sahaabah (may Allaah be pleased with them) that they used to pray between Maghrib and ‘Isha’. Abu Dawood (1321) narrated that Anas ibn Maalik (may Allaah be pleased with him) said, concerning the verse “Their sides forsake their beds, to invoke their Lord in fear and hope, and they spend (in charity in Allaah’s Cause) out of what We have bestowed on them” [al-Sajdah 32:16]: They used to wake up [according to another report: pray naafil] between Maghrib and ‘Isha’. Al-Hasan used to say: Qiyaam al-layl. Classed as saheeh by al-Albaani in Saheeh Abi Dawood.
Ibn Mardawayh narrated in his Tafseer that Anas (may Allaah be pleased with him) said concerning this verse: They would pray between Maghrib and ‘Isha’. Al-‘Iraqi said: Its isnaad is jayyid. Quoted from ‘Awn al-Ma’bood.
Al-Shawkaani (may Allaah have mercy on him) said in Nayl al-Awtaar (3/68): The verses and ahaadeeth quoted concerning this matter indicate that it is prescribed to pray a great deal between Maghrib and ‘Isha’. Although most of the ahaadeeth are da’eef (weak), they carry some weight when taken all together, especially with regard to virtuous actions. Al-‘Iraqi said: Among the Sahaabah who used to pray between Maghrib and ‘Isha’ were ‘Abd-Allaah ibn Mas’ood, ‘Abd-Allaah ibn ‘Amr, Salmaan al-Faarisi, Ibn ‘Umar, Anas ibn Maalik and some of the Ansaar. Among the Taabi’een were al-Aswad ibn Yazeed, Abu ‘Uthmaan al-Nahdi, Ibn Abi Maleekah, Sa’eed ibn Jubayr, Muhammad ibn al-Munkadir, Abu Haatim, ‘Abd-Allaah ibn Sakhbarah, ‘Ali ibn al-Husayn, Abu ‘Abd al-Rahmaan al-Habali, Shurayh al-Qaadi, ‘Abd-Allaah ibn Maghfal and others. Among the imams there was Sufyaan al-Thawri. End quote.
Based on this, it is mustahabb to pray between Maghrib and ‘Isha, without specifying a set number of rak’ahs.
And Allaah knows best.