In Huybrechts' book 'Complex Geometry', page 80, he considers a holomorphic map $f: X \to Y$ and an Weil divisor $D = [Z]$, with $Z \subset Y$ an irreducible analytic hypersurface. Using a local defining function $g$ for $Z$, he takes the local factorization of the map $g\circ f = \prod g_j^{n_j}$ and defines $f^{*}([Z]) = \sum n_j[Y_j]$, where $Y_j \subset f^{-1}(Z)$ are the irreducible analytic hypersurfaces of $f(Z)^{-1}$ (which is also an analytic hypersurface) and $g_j$ is the irreducible local defining function of $Y_j$.
What I wasn't able to see is why the $n_j$'s is the same for every point in $f^{-1}(Z)$.
Thank you very much.