an automated method is provided for selectively separating resin pellets having a gel count below a specified maximum from pellets having a gel count above the specified maximum , while the pellets are flowing in a pneumatic conveyor . the separation is based on an essentially continuous measurement in which a laser beam is utilized to detect the number of gels in a film made from pellets withdrawn as a sample stream from the main pellet stream . in response to the gel count measurement , a control signal is established that is utilized to manipulate a diverter valve located in the pneumatic conveyor , which diverts plastic pellet flow between a preferred storage means storing pellets having a low gel count and a secondary storage means for storing pellets having a higher gel count . in operation , a hold up tank is provided between the point from which the sample stream is withdrawn and the diverter valve , so that the plastic pellet flow can be delayed in the hold up tank for the amount of time required for the withdrawn sample stream to be converted into the film , whereby the gel count measurement is representative of the pellets passing through the diverter valve .