One and only one of each. And having more than 1 doctype declaration is ridiculous.
Browsers are very resistent to garbage markup, so by looking at the parsed tree and not the raw text, I never actually noticed that.
I have no idea why they would do that. It looks like a misconfigurated preprocessor that thinks each fragment is a doc of its own. I vaguely recall something about them open-sourcing the frontend, so I might look into that...