There are two kinds of characters in a story. One who has a name and one who does not.*
Characters who have an impact to the plot and appear in more than one scene should be named. They are a significant part of events and move the story along. Characters who perform a function, without significantly changing how the story unfolds, should not be named.
Unnamed characters are important and could be people in a crowd, a store clerk, a bus driver, or someone sitting on a park bench. They are identified by their function and add depth and description to the story. They may or may not interact with the named characters.
Looking at it another way: characters with names are like a team. They influence each other and carry the story along. Characters without names support the team like a cheering section.
Some authors think it is cruel to leave characters nameless, so they name everyone. There are other authors who create characters just to name them. Then, there are authors who have multiple names for the same character. With so many names, I get confused trying to find out who is important and who is not. I want to enjoy the story and not have to work at remembering names.
Also, I find that too many names drag the author into using unneeded words to create unneeded characters in unneeded scenes. The story becomes more about naming characters and not about telling the story.
How many named characters should there be? There is no specific number. But keeping the number of names low helps the author focus on the story and the reader not to be confused.
* There are other types, but this fits my blog’s theme.