Metabolic dependence of phytoplankton species richness