It can be measured in different ways: species richness and species diversity
species richness is the number of species within a community
Species diversity looks at the number of different species in a community, and also the evenness of abundance across the different species present