It depends on the cubic volume of the box and the size (gauge) of the conductors in it. For example, a single gang box for an outlet with 2 pieces of 12/2 WG romex coming into it by code would have to have a minimum of 16 cubic inches of volume.
2.25 cu in for each current carrying conductor (9 cu in)
1X one conductor volume for the grounding conductors (2.25 cu in)
2X one conductor volume for the device (4.5 cu in)
Cable clamps inside the box would add to the size requirements.
If you are using conductors other than 12 ga, then the conductor volume requirement is different.
Note that this is only an example and NOT an exhaustive treatment of the code on the subject. Look up box fill in the electrical code.
thanks guys... sorry if I didn't give enough imfore... I'm talking about a regular size octagon juntion box 3 -3/4"x 1-1/2" deep or a rgular size switch box or a regular size receptcale box 3"x2"x2" deep... with 15 amp. 14-2 romex... how many joint are allowed in these boxes... using marets