It is narrated from Sayyiduna Abdullah bin Mughaffal (may Allah be pleased with him) that the Messenger of Allah (peace and blessings be upon him) ordered the killing of dogs, then said: "I have no concern with dogs." And he (peace and blessings be upon him) granted a concession for the hunting dog and the dog that guards goats, and said: "When a dog puts its mouth into a vessel, wash it seven times, and the eighth time clean it with dust."
Sayyiduna Abu Hurayrah (may Allah be pleased with him) was the most retentive of those who narrated hadith in his time, so his narration takes precedence. Hammad bin Zayd narrated, from Ayyub, from Muhammad bin Sirin, the fatwa of Sayyiduna Abu Hurayrah (may Allah be pleased with him) of seven (washings), just as he narrated it; and this indicates the error of the narration of Abd al-Malik bin Abi Sulayman, from Ata, from Sayyiduna Abu Hurayrah (may Allah be pleased with him), of three (washings). What Abd al-Malik narrates in contradiction to the trustworthy narrators is not accepted. And success is from Allah.
Hadith Referenceالسنن الكبرى للبيهقي / كتاب الطهارة / 1149