Hadithcore
Sahih Muslim, 2632 c
sahih

Abu Huraira reported that Allah's Messenger (ﷺ) said to a woman of the Ansar:

In case anyone amongst you sees the sad demise of three children of (hers) and she resigns herself to the will of God hoping to get reward, she would be admitted to Paradise. A woman from amongst them said: Allah's Messenger (ﷺ) , even if they (the children who die) are two. Thereupon, he (the Prophet, ) said: Even if they are two.

حَدَّثَنَا قُتَيْبَةُ بْنُ سَعِيدٍ، حَدَّثَنَا عَبْدُ الْعَزِيزِ، - يَعْنِي ابْنَ مُحَمَّدٍ - عَنْ سُهَيْلٍ، عَنْ أَبِيهِ، عَنْ أَبِي هُرَيْرَةَ، أَنَّ رَسُولَ اللَّهِ صلى الله عليه وسلم قَالَ لِنِسْوَةٍ مِنَ الأَنْصَارِ ‏"‏ لاَ يَمُوتُ لإِحْدَاكُنَّ ثَلاَثَةٌ مِنَ الْوَلَدِ فَتَحْتَسِبَهُ إِلاَّ دَخَلَتِ الْجَنَّةَ ‏"‏ ‏.‏ فَقَالَتِ امْرَأَةٌ مِنْهُنَّ أَوِ اثْنَيْنِ يَا رَسُولَ اللَّهِ قَالَ ‏"‏ أَوِ اثْنَيْنِ ‏"‏ ‏.‏

References2 variants
In-Book Reference
Book 45, Hadith 195
USC-MSA web (English) reference
Book 32, Hadith 6367 (deprecated numbering scheme)