Giving ghusl to maiyat is wajib e Kifai. Which means if someone passed away it is wajib on every Muslim to give ghusl and kafan to dead person. If no one performed then everyone will be punished but if few people performed then wajib was done and the one who has performed will be rewarded, others will not be answerable.
There is not any condition of number of maiyat to give ghusl to them.