This is correct if $P(S)$ is not contained in the support of $\mathrm{div}(\omega)$. It comes essentially from the definition of $i_x(K_X, P)$. You don't need $\omega$ to be an exact differential from. However the intersection number depends on the choice of $\omega$ (as well as the Weil divisor $K_X$). You can check this by yourself by multiplying $\omega$ by a non-zero constant in $K(S)$ and see the effect on the total intersection number. If $P(S)$ is contained in the support of $K_X$, then you can't define $i_x(K_X, P)$.
To get an intersection number independent of the choice of a rational section $\omega$, you have to use Arakelov intersection theory.