The number of ecological niches in a habitat refers to the habitat heterogeneity.
Explanation:
1. Ecological niches refer to the specific role or function of a species within an ecosystem.
2. Habitat heterogeneity refers to the variety of different habitats within an ecosystem.
3. A habitat with high habitat heterogeneity will have a greater number of ecological niches available for different species to occupy.
4. Each niche represents a unique set of environmental conditions and resources that support the existence of a particular species.
5. Therefore, the number of ecological niches in a habitat is closely related to the concept of habitat heterogeneity.