In Scrum, a development team performs the work of delivering a potentially releasable increment of “done” product at the end of each sprint.
The best size of the development team is small enough to remain fast and large enough to complete significant work within a sprint.
Scrum recommends from 3 to 9 developers. This is because it is small enough to reduce complexity and big enough to have all skills and capacity to accomplish the required work.
The product owner and scrum master roles are not part of the development team. Unless they are also working on sprint backlog items.
Keep in mind: The development team is self organized. So that no one directs or commands them on how to perform their work. Even the managers who are external to the Scrum team do not direct the development team.