Let $X$ be a Riemann surface and $K$ be the canonical bundle. Consider $D = p_1 + p_2 + .... + p_n $ a divisor on $X$. Is it true that number of zeroes of a global section of $K(D)$ is equal to deg$K(D)$ ? where $K(D)= K \otimes \mathcal O(D)$.
I know that for the case of $K$, deg$K$= number of zeroes of a global section of $K$. Same should follow for $K(D)$.