in reply to Re^2: x objects in y containers where all objects are used
in thread x objects in y containers where all objects are used

The OP specifically said he didn't want the count. The count is easy to get without even using recursion. It's a simple Combination:
C($num_objects-1, $num_containers-1) = C(4, 2) = 4! / (4-2)! / 2! = (4*3) / (2*1) = 6