You missed the important part in GP's claim: "past some baseline number".
And that may actually well be true. There's one interesting tidbit that came out of anthropological studies: apparently, earliest homo sapiens sapiens had a better developed brain than we do. This implies, at least indirectly, that they were better at core cognitive tasks (such as pattern matching) that seem to be underlying what we think of as "intelligence". In other words, if you took such an early human and put him in a modern world, with proper nutrition, education etc, he'd likely beat most of the kids in the class.
But then it shrunk. And the reason why is, indeed, that brains are very expensive energy-wise. That's why few other species get it even remotely close to what we have - you basically need to have a very specific set of environmental conditions and random inherited traits to coincide to produce an environment which would cause natural selection for intelligence to that extent in the first place. On the other hand, once it gets a significant starting push, the benefits that it yields long-term are such that it becomes the single most important trait (as you rightly note, there are more humans in the world than bears - indeed, more humans than any other mammals). But there is still an upper cap defined by energy requirements, and apparently we have actually hit that cap thousands of years ago already, and then bounced back slightly.
Regarding passing on genes, it actually doesn't even require having any children to pass on genes. Another way is to ensure the survival and the passing of genes of your relatives - sure, they don't share 100% of them with you, but if they share 50%, and with your support they can have 5 kids where otherwise they'd have 2 and you'd have 2, you (or rather your genes) are statistically better off.