21!
The Mediterranean Sea is bordered by a total of 21 countries across three continents: Europe, Asia, and Africa.
Here's the list of those countries:
These countries surround the Mediterranean Sea, forming what is often referred to as the "Mediterranean Basin."
Europe:
Spain
France
Monaco
Italy
Slovenia
Croatia
Bosnia and Herzegovina
Montenegro
Albania
Greece
Turkey (also in Asia)
Asia:
Turkey (also in Europe)
Cyprus
Syria
Lebanon
Israel
Africa:
Egypt
Libya
Tunisia
Algeria
Morocco (though only its northeastern tip touches the Mediterranean)