The variety of living organisms in a given ecosystem, including species richness and genetic diversity.