Short answer
The Qur'an answers this question itself, in the very next verse. It says that God (﷾) fixed the number of angels over Hell as a trial. The same verse says why. Jews and Christians, the People of the Book, would find certainty. Believers would grow in faith. Doubters would ask what God (﷾) means by the number. So the question a critic asks today is already named and answered in the passage. The verse also says that no one knows the armies of God (﷾) except God (﷾). Nineteen is the number of keepers, not a limit on His power. This is not a contradiction or a mistake. Islam's answer is that it is a test, and the verse says so.
Full explanation
What the passage is about
The verses before the number describe the Fire. It leaves nothing and spares nothing, and it changes the colour of the skin. The number of its keepers belongs to that warning. The passage ends by calling all of it a warning to mankind.
“And what will explain to thee what Hell-Fire is? Naught doth it permit to endure, and naught doth it leave alone!- Darkening and changing the colour of man!”
“Over it are Nineteen. And We have set none but angels as Guardians of the Fire; and We have fixed their number only as a trial for Unbelievers,- in order that the People of the Book may arrive at certainty, and the Believers may increase in Faith,- and that no doubts may be left for the People of the Book and the Believers, and that those in whose hearts is a disease and the Unbelievers may say, "What symbol doth Allah intend by this?" Thus doth Allah leave to stray whom He pleaseth, and guide whom He pleaseth: and none can know the forces of thy Lord, except He and this is no other than a warning to mankind.”
The number and the reason given for it
Critics say the number nineteen is arbitrary, or that it clashes with other reports about the angels of Hell. Verse 30 gives the number. Verse 31 follows at once and explains it. The keepers are angels. The number was set as a trial for those who reject faith. The doubters were expected to ask what God (﷾) meant by it. No other verse of the Qur'an gives a different number for the keepers of the Fire. The verse calls the number a trial. It says nothing of a hidden code.
“Over it are Nineteen. And We have set none but angels as Guardians of the Fire; and We have fixed their number only as a trial for Unbelievers,- in order that the People of the Book may arrive at certainty, and the Believers may increase in Faith,- and that no doubts may be left for the People of the Book and the Believers, and that those in whose hearts is a disease and the Unbelievers may say, "What symbol doth Allah intend by this?" Thus doth Allah leave to stray whom He pleaseth, and guide whom He pleaseth: and none can know the forces of thy Lord, except He and this is no other than a warning to mankind.”
How the commentators read it
Tafsir is the explanation of the Qur'an by scholars. Ibn Kathir, a scholar of tafsir who died in 1373, reports that the leaders of Quraysh mocked the number when they first heard it. Quraysh was the tribe that ruled Mecca. He says they thought a handful of their men could overpower nineteen. He says the next verse answered them: the keepers are angels, and their number is a test. He explains that the People of the Book were meant to find certainty. This was, he says, because the Messenger (ﷺ) spoke in agreement with the revealed books they already had. He reads the end of the verse as teaching that only God (﷾) knows how many angels He has.
Ibn Kathir explains that the number of the keepers of Hell was named as a test. The disbelievers of Quraysh mocked it and thought a handful of their men could overpower nineteen. The People of the Book were to be made certain, because the Messenger spoke in agreement with the revealed books they already had, and the believers were to grow in faith. He reads "none can know the forces of thy Lord, except He" as meaning that no one knows the number and multitude of God's angels but God.
Nineteen keepers and the angels who bring Hell
A sound hadith, a report of what the Prophet (ﷺ) said, speaks of other angels. It says that on the Day of Judgment Hell will be brought with seventy thousand reins, each pulled by seventy thousand angels. The Prophet (ﷺ) was describing a different host with a different task. The nineteen are the keepers set over the Fire. These other angels bring Hell forward on that Day. Verse 31 itself says that none knows the forces of God (﷾) except Him. So the nineteen keepers were never the whole number of His angels.
Abdullah ibn Mas'ud reports that the Prophet (ﷺ) said Hell will be brought on the Day of Judgment with seventy thousand reins, each pulled by seventy thousand angels.
“Over it are Nineteen. And We have set none but angels as Guardians of the Fire; and We have fixed their number only as a trial for Unbelievers,- in order that the People of the Book may arrive at certainty, and the Believers may increase in Faith,- and that no doubts may be left for the People of the Book and the Believers, and that those in whose hearts is a disease and the Unbelievers may say, "What symbol doth Allah intend by this?" Thus doth Allah leave to stray whom He pleaseth, and guide whom He pleaseth: and none can know the forces of thy Lord, except He and this is no other than a warning to mankind.”
The test the Qur'an sets for itself
The Qur'an asks its readers to consider it with care. It says they would find much discrepancy in it if it came from anyone but God (﷾). An objection to the number nineteen is not a contradiction. It is a question about why God (﷾) chose a number. The passage itself names that question and answers it. It gives the number and says why it was given. It says that doubters would ask what God (﷾) meant by it. The question a critic raises today is the one the passage already named and answered.
“Do they not consider the Qur'an (with care)? Had it been from other Than Allah, they would surely have found therein Much discrepancy.”
“Over it are Nineteen. And We have set none but angels as Guardians of the Fire; and We have fixed their number only as a trial for Unbelievers,- in order that the People of the Book may arrive at certainty, and the Believers may increase in Faith,- and that no doubts may be left for the People of the Book and the Believers, and that those in whose hearts is a disease and the Unbelievers may say, "What symbol doth Allah intend by this?" Thus doth Allah leave to stray whom He pleaseth, and guide whom He pleaseth: and none can know the forces of thy Lord, except He and this is no other than a warning to mankind.”
The objections answered
Qur'an 74:30-31 — Surat al-Muddaththir (The Cloaked One), verses 30-31
“Over it are Nineteen. And We have set none but angels as Guardians of the Fire; and We have fixed their number only as a trial for Unbelievers,- in order that the People of the Book may arrive at certainty, and the Believers may increase in Faith,- and that no doubts may be left for the People of the Book and the Believers, and that those in whose hearts is a disease and the Unbelievers may say, "What symbol doth Allah intend by this?" Thus doth Allah leave to stray whom He pleaseth, and guide whom He pleaseth: and none can know the forces of thy Lord, except He and this is no other than a warning to mankind.”
Cited for
Critics say the number nineteen is arbitrary.
The response
The passage does not leave the number unexplained. Verse 31 says it was fixed as a trial. Ibn Kathir reports that Quraysh mocked it, thinking a few of their men could overpower nineteen. The number tested whether they would take the warning seriously. Like the angels themselves, it belongs to the unseen, which is known by revelation.
Where it lands — The number is a trial, and the passage itself says so.
Sahih Muslim 2842 — Kitab al-Jannah wa Sifat Na'imiha wa Ahliha (Paradise, its Description and its People), hadith 2842
Abdullah ibn Mas'ud reports that the Prophet (ﷺ) said Hell will be brought on the Day of Judgment with seventy thousand reins, each pulled by seventy thousand angels.
Cited for
Critics say nineteen clashes with other reports about the angels of Hell. They point to the hadith of Hell brought forward by seventy thousand reins, each pulled by seventy thousand angels.
The response
Those angels have a different task. The nineteen are the keepers set over the Fire, while the others bring Hell forward on the Day of Judgment. Verse 31 also says that none knows the forces of God (﷾) except Him.
Where it lands — The nineteen keepers were never the whole number of God's (﷾) angels, so the reports do not clash.
Perspectives
The Islamic perspective
The nineteen keepers of Hell are angels, and their number was revealed as a trial. The passage names the objection and answers it, so it is not a new discovery. When the leaders of Quraysh mocked the number in the time of the Prophet (ﷺ), the verse after it answered them.
The verse right after the number says the number was fixed as a trial. It says the disbelievers would ask what God (﷾) means by it.
The same verse says only God (﷾) knows the forces of God (﷾). So nineteen is the number of the keepers, not a limit on His power.
The hadith of the angels who bring Hell forward describes a different host from the nineteen keepers of the Fire. So the two do not clash.
The commentators report that the leaders of Quraysh mocked the number, and that the verse after it answered them.
A question about why God (﷾) chose a number is not a contradiction. So it does not meet the test of Qur'an 4:82.
The angels who guard the Fire, and their number, belong to the unseen. Muslims accept the unseen on the word of revelation.