So some things you should consider... If you're making a Team from an existing set of heroes with their own merits, it is always best to play with the personalities. It's more forgiven if you start with six or seven (Avengers, Justice League) but the rule is give everyone time to shine. Because they are per-established, they have unique personalities that may overlap and the dynamic here is the reader wants to see how they play off each other. Everyone is equally the main character.
In terms of a new team that is assembled from the get go, the general starting numbers are 3, 4, and 5. These numbers ensure that there is enough personality to butt heads, but not so many characters that the others get forgotten in the plot. I'm going to address 4-man teams first because there isn't much difference between them.
Four man teams are largely American teams that model a Nuclear Family of sorts. Typically there is a Team Dad, who is sort of aloof and emotionally distant, but this isn't a lack of love, but usually has duties that draw his attention away from the family. When the chips are down, he is always there for the team and can usually focus them on the mission at hand. Team Mom, the nurturer and more emotionally attentive to everyone's needs. If the father can unite against internal threat, she's going to be the voice of reason during internal family quarrels, and two team children, the older straight (and physically bigger) man and the younger clown. The children tend to be closer to the team problem, especially in continuing series as real life kids tend to be major impacts on all family events in the families life. As such, they are often the cause of the problems. The older child tends to be more level headed and agreeable with the parent analogs, but will also have conflicts of interest that are external to the family or cause him to have conflicts with the external life and internal life within the family. Usually these conflicts are to satisfy needs that aren't family concerns but will bring in trouble that quickly becomes the family concern. The Younger child, by contrast, is his own worst nightmare and thereby, the single greatest cause for concern internally in the family unit. Often impulsive, he's simultaneously able to think up innovative zanny schemes and stupid enough not to realize the risk. Many of these zanny schemes are harmless pranks aimed at the older sibling, the favorite target, that tend to get out of hand way to fast and requires all hands on deck to solve. When he doesn't cause trouble, the more comedic nature shines as being the one to harass the enemy the most. Most of their opponents will be an out group element that challenges the entire team... since the team is a family, they tend to work best as a family and rarely does any one team member outshine the other... typically they take turns with introducing the problem.
Teams of Three typically work in a Fruedian Id, Ego, Super-ego dynamic... or in fiction, a Bones, Kirk, Spock dynamic. These typically work by the Id and Super-Ego providing two opposed views of a problem that the Ego must then work out and find a middle ground. Typically, the Id character will be a visceral reaction to an offending thought of the more rule-lawyer and logic bound Super-Ego. That is, the Super-Ego will understand why the system has created the problem and what their actions mean. The Id is opposed to the whole system and cites this issue as a reason why they should throw the rule-book out. An important point of note, is that the logic and rules of the system need not be logical or even well thought out. Merely that the Super-Ego character will understand the decision making process with the rules in place. Spock has observed that if the rules follow no known logic, than illogical action is permissible. Typically your hero character is the Ego, who is clever enough to fuse both points of disagreement into an agreeable fix. Trinity teams work great as well because of the fact that a group of three is the smallest group possible in which one person can be an Outsider to the group. This is a major theme of "The Blue Man Group" where one of the Blue Men is always portrayed in opposition to the other two, allowing for many stories to revovle around settling internal differences to solve an external problem.
A Five person Group is best exemplified by Power Rangers/Super Sentai teams. If you have a specific hero character in mind, it's important to distinguish there place on this team first, before you flesh out the other character. The hero is the eyes and ears of the reader for rest of the team... so the hero does tend to get a bit of a spotlight. Typically, they come in one of two ways: The hero is either the newest member on the team, or he double hats as the team leader. Either way, you have a character who can safely get details out to the reader. In the former's case, the team is going to bring him up to speed on the exposition or the latter, who will brief the crack team he just assembled. The leader and the hero can often be one in the same as both characters are known for their ability to assess and bring out the best qualities of people.
Another standard character is the Lancer. In Power Rangers, with rare exception, this tends to be the Blue Ranger of a team. The Lancer is best described by being that which the Hero/Leader is not. If the Leader is cool and level headed, he will be brash and prone to action. If the Leader is extroverted, he will be introverted. If the Leader is a loose cannon who gets results, the Lancer will be the guy to quote the rule book chapter and verse of the regulations the Leader just broke. He serves to criticize the leader and dress down the hero. However, no matter what, question his loyalty at your own peril. If the Leader is not the hero, the hero will find that despite all the bad mouthing the leader will experience at his disrespect, the leader does value the Lancer's advise... they may even be good friends despite their opposite natures. If the hero is the Leader, the Lancer may not respect the command style and isn't afraid to tell the leader to his face, but these disagreements have some merit to them. He is not dissing you out of spite or malice but actual concern. The most defining characteristic here is that the Lancer is the tactical mind of the team and while the leader may order something and the hero may save the day, he is the one who reminds them of the things they overlooked.
The next two characters tend to be a little more loose in defined characteristics as they tend to float between collections of the team. If the story is about the conflict of the Hero/Leader and Lancer, these two will form a micro team with the fifth character. If not, usually one will form a missing part of the Fruedian Trinity as mentioned above while the other two have some adventures... or are damsels in distress. In power Rangers, these are typically the Black, Green, or Yellow Rangers and one of those three is always absent as are some traits. Typically one will be the Royal Smart Person, whose job it is to spout of technobabble until a new invention or vulnerability of the bad guy is revealed. The other is the Big Guy, who's job it is to wield the physically largest weapons and throw another teammate in a fast ball special, and get dogpiled by the mooks. Another personality trait is that they are the eager young cadet who is just junior to the team and is a bit more of a jester or comic relief and tends to fight with more oddball antics or pure speed and agility. These traits get blended around so you could have combos like the Genius Bruiser (A big guy who is smart) or big funny man. Another one of them may be a bit more serious. Typically these two tend to be best of buds or like brothers and sisters or brother and brother. Basically wild cards in character, but season to flavor.
Finally, and again, we have the Heart (Usually the Pink Ranger). What kind of lame power is heart? Well, typically they are not the best fight, almost never get to be part of the trinity, and may often times be the lone woman on a team of men (though they need not be women. Flash, from Justice League and JL Unlimited cartoons is the heart of his team). Typically they are the most empathetic to the needs of others, and will be the diplomat of the team. They tend not to be the greatest of fighters or combatants, she tends to be the one to patch up the wounds of the team, both physical and emotional. That said, those that underestimate her do so at their own peril. She still can kick ass and take names... and if that cannot get the job done, behind her are four people who can agree on few things, but "You make her cry, we make you cry" is one of the few common believes of these teams.
Typically, teams of five start out that way but rarely finish. Usually there is a Sixth Ranger who will be brought on at some point in the early middle part of the series. Sixth Rangers will typically shake up the new pecking order of the series, either by the trouble they bring with them, or by upsetting the recently stabilized team dynamic. There are no real hard rules about what the sixth ranger personality is like. Fighting wise, they are equally mixed of melee and ranged. The only rule is that they didn't start on the team in episode one. Because of this, they tend to be great vehicles for alerting the team to the furtherment of the plot of the bad guy, often they tend to have deep connections to the villains that run deeper than the rest of the team. Often, they can even start as villains with codes of honor, which throw's the team dynamics off because the team will have strong emotions of accepting someone who tried to kill them into the fold. These types tend to have valuable intelligence into the villain's inner workings, plotting, personality, and other things that explotative understandings. If they aren't in the villain's employ, they may be from an earlier attempted team and provide value in knowlegeable fighting of bad guys, personal knowledge of those in employment, or a familiarity of the enemy that comes with experience.