In a forest ecosystem, the pyramid of numbers is upright because trees (producers) are the fewest, herbivores (primary consumers) are more numerous, and carnivores (secondary consumers) are most numerous. This creates a classic pyramid shape with the base wider than the top.