A: The Almighty Allah (swt) says in the Quran: They will say, ‘[They are] three; their dog is the fourth of them. They will say, ‘[They are] five, their dog is the sixth of them,’ taking a shot at the invisible (i.e. making a wild guess). They will say, ‘[They are] seven, their dog is the eighth of them.’ Say, ‘My Lord knows best their number, and none knows them except a few.’ So do not dispute concerning them, except for a seeming dispute, and do not question about them any of them (Q 18:22).
‘Allāmah Sayyid Muhammad Husayn Tabātabā’ī comments in his Tafsīr al-Mīzān that there are three views about the number of Companions of al-Kahf according to the above verse: they were three of them and the dog was the fourth, five of them and the dog was the sixth, and seven of them and the dog was the eighth. After the second view, Allah says people are making a wild guess. When Allah cites the third view, ‘[They are] seven, their dog is the eighth of them’, He does not ‘indicate to say that is false. This creates the impression that it is the correct opinion.’ Then ‘Allāmah explains in detail about the possible meaning of the verse and what is Allah trying to tell us. He concludes by stating, “Since your Lord knows the best, and He has already informed you of their tidings, argue with them only about the youths on the basis of clear argument without going deep into the matter. . .”. Therefore, there is no need to worry about the specific of their number or names, as long as we derive the Divine guidance of the narration, which has been the main function of Quranic stories. Allah knows the best.
Ref: Al-Mizan: An Exegesis of the Qur’an, Vol. 26, ‘Allāmah S M H
Tabātabā’ī, S. Rossier (tr.), pp. 56 – 60.
Academy for Learning Islam