In my (very) limited experience, the U.S. provided the best toilets. Usually (but not always!) clean and almost always free. This is just one of the many "human comforts" that Americans take for granted, but are rare and expensive elsewhere.
In Spain, toilets were generally clean, but few and far apart. I hear this is the rule in the Continent, not the exception. Compare this to the U.S., where almost every business establishment has a bathroom available, and nobody charges.
In Morocco, even moreso, and the toilets were mostly of the "squat" variety, which I despise.
In Costa Rica, I don't remember going to the bathroom other than in the hotels we stayed at. One thing about Costa Rica - and almost all of Latin America by extension - is that the plumbing in all but the newest of neighborhoods and luxury establishments in unable to cope with toilet paper. As a result, you have to "dispose" of your dirty toilet paper in the garbage next to the toilet. This tends not to smell as bad as one would think.