Unless you count random poeple in the Pokemon centers and trainers etc. as NPCs (which I dont since in my opinion they're not really characters, just more like random people) there are 266 NPCs combined in all the core games, according to Bulbapedia.
I do hope I helped a little atleast. :)
-I like Gible