I have had as few as 2 in a 25 and as many as 5 in a 180. If you have the same species, for me they all seem to get along and they all get pregnant and carry eggs.
On top of being scavengers, they will eventually figure out how to eat everything you feed your fish, including flake food.
It's good to get at least 2 of them because the babies will hatch every few weeks and provide live food for the rest of the critters in your tank.
Best of luck,
Roy