Unless you replace the engine with the exact same make and model you will more than likely have to remove the old engine mounts and glass in new ones. You also want to check if the rotation will be the same or else you need a new prop. Exhaust, water intake, etc, etc, may have to be modified/changed depending on location of things on the new engine. A lot of people have reported that the cost of installation has equalled the cost of the new engine.
Wow, I never even considered a few of those points. I knew I would have to worry about the mounts and such. If I went with a new engine I was planning on moving from a 16HP Yanmar 2GM20F to a 27HP Yanmar 3GM30F. I don't need the extra HP but the price difference between a re-manufactured 2GM20F and a new 3GM30F is $600. I could disassemble the old engine and remove it along with the transmission, I would have to get someone with better glass knowledge than me to do the mounts and need help installing the new engine and transmission. The weight alone would require assistance to maneuver the engine into the mounts. Once seated though I could re connect the exhaust, water intake....
Sounds like it might be easier to just do a total rebuild if needed as opposed to a new engine.