40 People attending Janazah Salaah
Sayyiduna Ibn Abbas
رضى الله تعالى عنه
رسول الله صلى الله تعالى عليه وسلم
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.