Jami` at-Tirmidhi, Book 10, Hadith 77 (Tirmidhi 1043)

Abu Muhazzim said:

"I accompanied Abu Hurairah for ten years, and I heard him saying: 'I heard the Messenger of Allah saying: "Whoever follows a funeral, and carries it three times, then he has fulfilled the right that is required from him."