>>27820698Anime never said there were only 8.
Based on all the trainers shown during the Indigo league, Kanto has around 27 gyms or so.
Hoenn was shown to have around 9 based on what was shown.
Sinnoh had around 11 based on Barry and Nando's badges shown.
Unova we know has 10 between both sets of games, Tripp and Cameron introduced 4 more unknown badges bringing the count to 14.
Sawyer had three unknown badges in Kalos meaning there were at least 11 gyms.
As for why Gary had 10, there isn't a limit as to how many you can earn. Only a time limit for when the tournament starts.