The Quran Verse
Surah 31:27:
And if whatever trees upon the earth were pens and the ocean [was ink], replenished thereafter by seven oceans, the words of Allah would not be exhausted...
The Magic Number 7
The use of the number "seven" for the oceans reflects the Ancient Near Eastern and Mediterranean cosmology of the "Seven Seas."
This is a localized, poetic expression. To an omniscient God, the actual number of oceans (or the volume of water on Earth) would be known. By using the "Seven Seas" trope, the Quran stays within the limited geographical and mythological vocabulary of the 7th-century world rather than providing an accurate global perspective.