The first thing to know about seahorses is that in general they all have specific diet and tank requirements, depending on the species. The difficult part in answering broad questions like the above is that one answer does not fit all.
One of the most commonly kept seahorses is h. (hippocampus) Kuda. This species can grow to a height of 10 inches, and so a 20 gallon would not be a good longterm home for this species. Certainly not 2 to 4 of them. And particulary not if they are pairs that might breed. They may be slow-moving animals most of the time, but they do require room, just as any other fish would that has the potential to grow to that size.
A 29 gallon would be a good home for 2.
Seahorse diet requirements are tough for a lot of folks to fit into their schedules. They need a MINIMUM of two feedings a day, with ideally, A good naturally occurring food source like copepods so they can supplement. And, remember, the animal should live 4 to 6 years. It's a commitment.
Seahorses have no stomach, digestion is relatively quick and nutrients are not stored in a way that allows meals to be missed. They need a regular flow of nutrients. If they are not fed enough, they starve and it is not a simple thing (often impossible) to nurse an undernourished seahorse back to health. If they are fed too much, the food can pass through undigested and it is wasted (literally) which is not good for the seahorse or your water quality.
That is brief and very basic info.
Dwarf seahorses make the above look like a cake-walk. These little guys require live food. Bronco here keeps dwarf seahorses and I know you can use the search to find some of his posts.