Ibn 'Abbas (May Allah be pleased with them) reported:
The Messenger of Allah (ﷺ) said, "If a Muslim dies and forty people, who do not associate anything with Allah in worship, participate in the funeral prayer over him, Allah will accept their intercession for him."[Muslim]. (AR)
App reference (AR): Book 7, Hadith 39 (AR)
Arabic/English book reference (AR): Book 7, Hadith 933 (AR)