For those left behind

What are the spiritual dimensions and rulings pertaining to the Janazah prayer? How do we pray it, and why do we recite what we do? Does it matter how many people attend the Janazah?