I would only feed 3-4 peas once per day, IF your fish is
constipated.
Peas have a laxative effect on fish (high fiber content) but if the condition is bacterial or viral, feeding peas won't resolve the issue. In cases such as this I typically just add epsom salt (magnesium sulphate) to the tank water, as well as feed a 3% solution of epsom salt soaked pellets to the fish.
Dr. Erik Johnson, a world renowned DVM that specializes in koi & goldfish discusses this topic in the following link.
http://www.fishdoc.co.uk/faq.html
My fish has a swollen / bloated abdomen?
My fish are upside-down/ can't swim
"An attempt should be made to see whether the fish is defecating, in case the problem is being caused by an intestinal blockage. If this is suspected it is worth either trying to feed the fish a few frozen peas, which act as a laxative, or else try baths in Epsom salts (70g / liter for 5 minutes) which has the same effect."
If the fish is defecating and the condition still exists there could be a more serious problem that feeding peas will do absolutely nothing to help, such as internal parasites, deformed swim bladder, cancer or tumour growth, trauma from injury, etc.