Abd Khayr narrates from Sayyiduna Ali (may Allah be pleased with him) that he used to say six takbirs over the people of Badr, five takbirs over the other Companions (may Allah be pleased with them), and four over the rest of the people.
Hadith Referenceالسنن الكبرى للبيهقي / كتاب الجنائز / 6944