A length formula for the multiplicity of distinguished components of intersections