As many as you genuinely want and can support and love. I have two, which is probably enough for me. Since I love my kids and enjoy pregnancy and giving birth (yes, really!) I would like more but I have to balance that with our finances and the time we have to spend on them etc.
Re. overpopulation, I like to think my kids will help become part of the solution rather than just part of the problem. They're smart kids and with the right opportunities maybe one day they'll change the world for the better. More than that, I think if we give up on having kids that is in effect giving up hope for the human race altogether and I'm not ready to do that.
I have friends with large families who cop people being judgemental about them having "too many kids" and others with just one who get judgement about having an only child. You really can't win. Well, people seem to be happy if you have two, but then they can't help but say something like "you can stop now", especially if, like me, you have "one of each" (a girl and a boy). There are advantages and disadvantages to coming from a large family or a small one. Kids from larger families might find there isn't as much to go around when they are younger, and have to wear a lot of hand me downs. Only children will have to bear the pressure of trying to support their parents in their old age alone and have to deal with other people's rude comments about how "only children don't know how to share" (aren't stereotypes fun!). There's no hard and fast rule but as long as you can support them it's not anyone else's business how many kids you have.
If you can't support them you shouldn't have them. Though even if you can support them when you plan to have a family things could change down the track, you could lose your job or have unexpected medical bills or something, so even if someone needs help to support their family I try not to judge them if I don't know their circumstances.