Now, there are three items that take the same space as a full size habitat - the hatchery, the breeding tree, and the colosseum. That is all 12 of the islands excluding paid ones which i don't have. the smallest island fits 9, and the one just above it (the fire one) fits 18. On most of the islands i've fit either 16 or 14 habitats - 5 of each to be specific.
perhaps we can compare and find an extra space or two. I have tried at various times to rearrange and squeeze in one more habitat, on several different islands. I can offer you this - i'll describe my setup as briefly as i can, which i think is very nearly the most full-size habitats you can place. Also it does depend on what exactly you want to maximize, with crystals etc. I have wondered the same, all i can think is it would take a lot of effort to first of all find the optimal setup, and then write it up.