This document summarizes a droplet microfluidics device that can sort droplets based on the number of encapsulated particles using a solenoid valve. The device works by interrogating droplets with a laser as they pass through a detection channel, counting the fluorescent pulses from particles within each droplet. If the droplet contains the desired number of particles, a compressed air jet is activated to sort it into a collection channel. This approach allows for highly accurate sorting to generate homogeneous droplet populations containing a known number of particles per droplet. Potential applications include gene and drug libraries that require all droplets to contain an identical number of particles.