you can say sentences like "The only moving parts in a dishwasher are the two pumps, the sprayer arms, the water inlet valve, and the detergent dispenser"; or "there are only two hard problems in computer science".
In the dishwasher example, "only" refers to "moving parts" which is a collective singular, like how "baseball team" is properly an "it," not a "they."
Same goes for the compsci example. By modifying the plural with adjectives, you narrow its scope.