Only one more than 3rd gen, wich had 8.
Actually, the 3rd gen had 10 (Kyogre, Groudon, Rayquaza, Registeel, Regice, Regirock, Latias, Latios, Jirachi, Deoxys).
That being said, I think they overdid it a little bit. With so many legendaries it takes away from the importance of those that actually deserve to be one. Dialga, Palkia, and Giratina were good. Cresselia seems like the latis and I liked having to hunt it down. The lake trio comes off as the weak counterparts of the birds, dogs, and regis. If Regigas didn't have his terrible ability and had been given arceus' role, I think he would've worked excellently. Shamin was the token "cute" legendary (Mew, Celebi, Jirachi,). Heatran, Phione, and Manaphy shouldn't be classified as legendary, just hard to get normal pokemon. Darkrai was well designed in my mind and it did provide a good storyline for PMD2, although 3 event pokemon is pushing it. Arceus is the "ultimate" pokemon, which is cool, but hopefully he stays very rare and doesn't make his way into competitive battling.
The legendaries they should've included: Dialga, Palkia, Giratina, Cresselia, Darkrai, Shaymin, and Regigas (as the god pokemon). 7 is a much more appropriate amount.
But that's just my opinion.