What philosopher said the needs of the many outweigh the needs of the few?

It wasn't a philosopher, but was first spoken by Leonard Nimoy's Spock in Star Trek II: The Wrath of Khan. However, philosopher Jeremy Bentham had a similar quote: "It is the greatest good to the greatest number of people which is the measure of right and wrong."