It was the practice of the Prophet (peace and blessings be upon him):
"He (peace and blessings be upon him) would pray the forenoon (Duha) prayer as four rak'ahs, and would add to it as much as Allah willed."
Hadith Referenceصحیح الجامع الصغیر / حرف الكاف / 4959
Hadith Gradingالألبانی:صحيح
Hadith Takhrij[حم م] عن عائشة. مختصر مسلم ٣٦٥، الإرواء ٤٦٢.