How many Surahs were revealed in Makkah and how many in Madinah?

It is narrated from Hadhrat Ibn Abbas (R.A.) that he asked Hadhrat Ubayy bin Ka’b (R.A.) regarding the portions of the Qur’an that were revealed in Madinah. He said that only 27 Surahs were revealed in Madinah and the rest of the Surahs in Makkah.

Both Madinah and Mecca are in what is now known as Saudi Arabia. The two cities are roughly 451.0 km apart or 4 hours by car.