Originally Posted by
ajax
Just to clarify: it's not exactly that you can enter and exit as many times as you like.
Non-EEA citizens have no automatic right to enter the Schengen Zone. If the immigration officer believes that you are engaging in an activity other than your stated purpose of entry (for instance, if you are suspected of smuggling or working illegally but say you're a tourist) then you can be denied entry.
For most intents and purposes, though, you shouldn't have any hassle. As nomad1974 says, non-EEA citizens are permitted to stay 90 days out of any 180 in the Schengen Zone.
Sorry if it looked that I implied that I would automatically get in. I don't imagine having any issues though since my return flight back to the US would be from Spain in a few days after returning from Morocco.