In exercise I.5.2 in Harshorne there is the following definition of intersection multiplicity for two curves in $\mathbb{A}^2$: \begin{equation} \mathrm{length}_{\mathcal{O}_P}\mathcal{O}_P / (f,g) \end{equation} where $P$ is the point in the intersection we are interested in, $\mathcal{O}_P$ is its local ring in $\mathbb{A}^2$ and $f$ and $g$ are the polynomials giving the two curves.
On the other hand I found in various references, such as Fulton's Algebraic Curves, that the length is taken over $k$, the residue field of $\mathcal{O}_P$.
Since $k$ embeds in $\mathcal{O}_P$ naturally, I can see any sequence of $\mathcal{O}_P$-modules as sequence of $k$-modules and then I get that the length over $k$ is grater or equal than the length over $\mathcal{O}_P$.
At this point I guess the two definitions should be equivalent, but I am stuck in trying.
Any hint or answer about this is welcome!
Given a finitely generated module $M$ over a noetherian ring $A$, there exists a filtration of $M$ by submodules $M=M_0\supset M_1\cdots \supset M_n=0$ such that $M_i/M_{i+1}\cong A/\mathfrak p_i$ for some prime ideals $\mathfrak p_i\subset A$ (Bourbaki, Commutative Algebra, Chapter IV, §1, Theorem 1, page 261)
Now $M$ has finite length iff all the $\mathfrak p_i$'s are maximal and this applies in our case, where $A=\mathcal O_P$ and $M=\mathcal{O}_P / (f,g)$.
We then have $\mathfrak p_i=\mathfrak m_P\subset A=\mathcal O_P$ and finally $$\mathrm{length}_A M=\sum_i \mathrm{length}_A(M_i/M_{i+1})=\sum_i \mathrm{length}_A(A/\mathfrak m)=\sum_i \mathrm{length}_Ak=\sum_i 1=n=\mathrm{dim}_kM$$
Remarks
1) I have assumed that $M=\mathcal{O}_P / (f,g)$ has finite length: this follows from its finite $k$-dimensionality which itself follows from the finiteness of the intersection of two curves with no common irreducible component.
2) In all of the above I have not assumed $k$ algebraically closed.