Groups containing a given number of products are produced using a transfer assembly, wherein a first, pocket-type output, conveyor of a production machine, and a second, pocket-type input, conveyor of a group-forming machine move continuously in a first and, respectively, second direction opposite each other, and are connected to each other by a pocket-type transfer member, which is interposed between the first and second conveyor, and is operated to selectively rotate about an axis of rotation crosswise to the first and second conveyor; or to translate, together with the second conveyor, crosswise to the axis of rotation to compensate for one or more voids on the first conveyor; or to translate, together with the first conveyor, crosswise to the axis of rotation to form, on the second conveyor, a succession of voids in time with the group-forming machine.