“Zaid bin Arqan used to say the Takbir four times in the funeral prayer, and he said the Takbir five times for one funeral. I asked him (about that) and he said: ‘The Messenger of Allah (ﷺ) used to do that.’”
Sunan Ibn Majah Book 6, Hadith 73