No, under some regs there are specific requirements for the physical dimensions of the box. Under NEC article 314 for example, there are two ways of sizing a box. If it is one of the standard sizes (there are a couple of dozen) then the maximum number of cables of any size can simply be looked up in a table. A square 4 x 4 x 1 1/2" box has a usable volume of 21 cubic inches and may be used to terminate no more than 14x #18 conductors, 12x #16 conductors etc. If the box is of any other size or you need to calculate for a selection of cable sizes you can use the volume requirement per conductor terminated, per clamp installed, per ground strap etc as tabulated, e.g. each #10 conductor requires 2.5 cu. ins. The volume is always printed on the box.
This is one of the things I would point out to people who think BS7671 is vague; it tries to avoid being prescriptive, in this case entrusting choice of suitable dimensions to the installer.