It is narrated from Sayyiduna Ibn Abbas and Sayyidah Aishah (may Allah be pleased with them both) that the Prophet (peace and blessings be upon him) stayed in Makkah for ten years with the Qur'an being revealed to him, and in Madinah too, for ten years, the Qur'an was revealed to him (peace and blessings be upon him).
Hadith Referenceالسنن الكبرى للبيهقي / كتاب اللقطة / 12167