the general rule for freshwater is 1 inch of adult fish per 1 gallon ot tank space. This rule applies mainly as a waste to water ratio.
The inch per gallon guideline is pretty worthless IMO. I'd never recommend using it.
Be careful adding 5 fish to a brand new aquarium. Perhaps use a gallon or two of water from the already established aquarium. Also beneficial bacteria supplement from a store will help prevent fish loss. I reccommend taking both precautions!
The majority of the beneficial bacteria are not found in the water column, but rather on surfaces in the tank such as filter media, substrate, decor, etc. It would be much more helpful to start with a filter pad or a handful of gravel rather than dirty water.
You may still experience "New Tank Syndrome" which is a bacteria bloom that causes the water to appear murky. DO NOT DO A WATER CHANGE, as this will make problem worse. Leave the tank alone and the bacteria will settle in about a weeks time.
New tank syndrome actually doesn't refer to a bacteria bloom, but rather to a tank that is new and is going through the cycling process. In a cycling tank, leaving it alone is the worst thing one can do. Cycling with fish requires large, frequent water changes in order for the fish to (hopefully) survive. Established filter media, gravel, etc. will greatly shorten this process.