Perfect HP, Atk, Def and Spd Marill holding Power Weight and Perfect Atk, Def, Sp.Def and Spd Marill holding Destiny Knot produce a Marill with perfect HP, Atk and Def.
So it seems if you're inheriting a Power IV, you'll only inherit 4 Destiny Knot IVs.