When it comes to building exceptional teams, I have found a pretty good sweet spot for team size.

The old 2-pizza team isn't the answer. I also never thought the 2-pizza thing made sense. That is like 3 hungry Americans.

Smallest Size

The smallest size team is about two people. Obviously if there was just one you don't have a team at all, but you can do quite a lot of good stuff with just two people.

Admittedly these two people need to have a really broad range of skills that compliment one another. Read Skill Liquidity Assessment if you want to see how to do that.

But I've seen two folks do what several "teams" can't. Its not a guarantee, but possible.

Largest

Some of the largest functional teams I've worked with get c to about 13 or so folks. You can probably go higher up to 20-ish, but this will rely a lot more on facilitation to help navigate decisions and information flow.

Who Is on the Team

Aside from a concept of capacity. You'll need to focus primarily on the Skill Composition of the team.

When you mix up a new team, pay attention to how power dynamics might shift. A tech-lead may suddenly struggle because of a different skill demand than they're used to. For some folks this is exciting and for others it is a threat to their ego.

I recommend frequent 1-on-1 Meetings to feel these things out and help folks acclimate in a safe environment.

What About Scrum Masters Etc.

For the sake of this, these more secondary roles are considered part of the team. There are cases when I won't count them, but when it comes to forming a team they are counted as one of the members.

Does a team of two need a scrum master? Look at the Skill Liquidity Assessment to know that.