40 People attending Janazah Salaah
Sayyiduna Ibn Abbas
رضى الله تعالى عنه
narrates:
I heard
رسول الله صلى الله تعالى عليه وسلم
saying:
When a Muslim passes away, and forty such people attend his Janazah Salaah, who do not ascribe partners with ALLAH TA’ALA, then ALLAH TA’ALA accepts their intercession for him
(MUSLIM)
When more people attend a Janazah Salaah, the reward for the deceased is more, due to the increased amount of Du’as, in his favour.
A specific number is not the objective.
Some narrations have 100 people and some have 3 rows.
Sometimes ALLAH TA’ALA promises rewards, due to His benevolence, although nothing is binding upon Him.