The average main cast of an anime is between 5-20 characters, let's say the absolute average is around 12 for simplicities sake. Let's now assume there is around 20 side characters per main character to establish a world, there is of course outliars on the upper side, but that's the lowest boundary, and that's only the amount of shown characters with about 13,000 Anime in western databases that would amount to about ~3.3 million drawn characters as a lowball, seeing as we usually only see certain regions of a world let's also assume we get to meet, the average population percent of a fairly large city in the US which sits at about 1.8% which is again, extremely lowballing and assuming there's only 1 country in each and every single anime. This would mean there is about 180+ million characters at all though most not explicitely shown.
I hope I could answer your question, I wasn't sure which one of those two results you wanted. Again, this is an extreme lowball.