This is anecdotal and experiential, but something I learned in the process of getting feedback and editing one of my works is that it’s not necessarily how many characters total but how quickly they are introduced.
I would get feedback saying that readers couldn’t keep track or there were “too many” characters.
But, I tested different drafts and found that if I introduced the characters more gradually, readers accepted them.
For example, instead of introducing 12 characters and naming them all at once, there’s one scene in a location where the first four are introduced. Readers recognize them as a family unit, so collectively these four characters are easier to remember as parents and children in a family.
Then they go to a second location where a number of other characters are mentioned to be, but not necessarily named and described.
In this location, gradually four other characters are introduced with names and descriptions as extended family members. And most of these have speaking lines.
Later, some family members leave to a third location and meet 4 other characters (75% of them unrelated).
12 characters total.
But their association with a group helps readers collectively identify that a fictional group/family exists even if they aren’t entirely clear on who each character is, yet.
And introducing them in different scenes/locations within a chapter helps to associate them into sub-groups or categories which also helps readers remember. Like: Oh, the guy they met in that place is back."