Unlike many sports, there are very few rules in Soccer/Football, only seventeen in fact, and none of them address how many people have to be in a wall or even if there has to be a wall. As @Ewnan says it is the choice of the individual player to decide where he stands and how many stand with him. I say the player but actually it is more of a team decision and a general rule of thumb is the closer to the goal, the bigger the wall. Many times the number of players and the position of the wall is determined, and directed, by the goalie particularly if the kick is being taken from some distance away. Initially, someone in the wall will be looking back to get directions from the goalie who will move the wall by indicating with his hand which way he wants them to go and holding up fingers indicating how many players he wants. What he is trying to do is block the main avenue of attack and force the kicker to send the ball where he can more easily retrieve it.
The rules only address two things, (or three depending on your point of view) the first being the type of free kick, direct (meaning it can go directly into the goal from the kick) and indirect (meaning it has to be touched by another player before it can go into the goal). This is why you will, on occasion see two players run at the ball; one touches it, making it a live ball, and the other fires the shot. The other rule is that no opposing player can be within a 10 yard perimeter of the ball at the time of kick. This is why you will see the ref draw a line for the players to stand behind when they form a wall. He is setting them back 10 yards. He could draw an entire circle around the ball but most of the time they do not concern themselves with where opposing players are behind the ball.
The other rule that indirectly affects the free kick is the offsides rule which states that you must have two opposing players between you and the goal when the ball is kicked for you to receive. This is why you do not see players of the kicking team standing behind the line of defensive players between them and the goal. Until that ball is struck, if they are in an offsides position anything they do with the ball will not count even if they get it in the net. So by being in the line among the defense they both give themselves the opportunity to form a hole that can be exploited and put themselves as close to the goal as is allowable. Once the ball is struck however then it is a free ball. That is why you will see them and the defenders make a mad dash into the box to get to the ball after it is kicked.
Hope this clears it up.