Cucumbers, melons and squash are fruits that contain at least 200 seeds, whereas apples, pears and citrus fruits only contain a few seeds. Tomatoes and peppers are simple fruits, which consistently produce lots of seeds due to the way that they are grown.
Simple fruits are formed from one ovary in a plant, whereas aggregate fruits and multiple fruits form from several ovaries. Raspberries are an example of an aggregate fruit, and have many seeds. Pineapples do not contain any seeds, and represent the multiple fruit category.
Some fruits produce many seeds in order to increase their chances of reproduction. Other fruits put all of their energy into strengthening one seed, and reproduce through that singular seed.