Which game are you playing? In the mainline Pokémon games, Master Balls are normally limited to just a few per playthrough. If you want a large quantity, you'd typically need a cheat device such as an Action Replay for the DS, which you can look up in the game's cheat listings.