Abdullah bin Ma'qil (may Allah be pleased with him) said: Ali (may Allah be pleased with him) offered the funeral prayer over Sahl bin Hunayf (may Allah be pleased with him) and said six takbirs over him. Then he turned to us and said: "He was one of the people of Badr."
Hadith Referenceالسنن الكبرى للبيهقي / كتاب الجنائز / 6942
Musa bin Abdullah bin Yazid said that Sayyiduna Ali (may Allah be pleased with him) offered the funeral prayer over Sayyiduna Abu Qatadah (may Allah be pleased with him) and said seven takbirs over him, and he had been at Badr.
It was narrated like this, but it is an error, because Sayyiduna Abu Qatadah (may Allah be pleased with him) lived on for a long time after Sayyiduna Ali (may Allah be pleased with him). It is also reported from Sayyiduna Ali (may Allah be pleased with him) that he said four takbirs over Yazid bin al-Mukaffaf.
Hadith Referenceالسنن الكبرى للبيهقي / كتاب الجنائز / 6943
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