Here is what Google says
“The answer is yes. While a country code domain name helps our systems to geotarget for that country, it still allows for global visibility.
The only limitation is that you can’t specify other countries for geotargeting. For example, if you have a .fr website for France, you could use that globally. But you wouldn’t be able to explicitly geotarget users in Brazil.”
Hence, the best solution is to register as many ccTLDs as you can!