$\newcommand{\P}{\mathbb{P}}\newcommand{\C}{\mathbb{C}}$ Consider irreducible surfaces $P,Q\subset \P^3$ of degrees $p$, $q$. Let $C=P\cap Q$ be the scheme-theoretic intersection, reduced or not. We have a complex of line bundles on $\P^3$.
$$
X=O(-P-Q)\to O(-P)\oplus O(-Q) \to O.
$$
It is quasi-isomorphic to $O_P(-Q)\to O_P$ and therefore has only cohomology in degree $2$, and the cohomology is isomorphic to $O_C$, the structure sheaf of the curve $C$. Hence we have
$$
H^{*+2}(\P^3, X) = H^*(\P^3, O_C) = H^*(C, O_C).
$$
Let us compute the cohomology of $X$. Note that $H_0(\P^3, O)=\C$ and other cohomologies vanish. Note that $H^i(\P^3,O(-P))=0$ for $i=0,1,2$ and the same for $O(-Q)$ and $O(-P-Q)$. Drawing the spectral sequence we see that $H^0(C, O_C) = \C$. The Euler characteristic of $X$ is given by
$$
\chi(C,O_C) = \chi(\P^3, X) = 1 - \binom{1-p}{3} - \binom{1-q}{3} + \binom{1-p-q}{3} = -\frac{p q (p+q-4)}2
$$
Now the structure sheaf of $C$ fits into exact sequence
$$
0\to J \to O_C \to O_C^{red}\to 0,
$$
where $J$ contains all the nilpotent elements. So we obtain a long exact sequence
$$
0\to H^0(C, J) \to H^0(C, O_C) \to H^0(C, O_C^{red}) \to H^1(C, J) \to H^1(C, O_C) \to H^1(C, O_C^{red}) \to 0.
$$
So we see that $H^0(C,J)=0$ and therefore $\chi(C, J)\leq 0$ and $\chi(C, O_C^{red})\geq -\frac{p q (p+q-4)}2$.
Let $\pi:\tilde C\to C$ be the normalization of $C$. Suppose $\tilde C$ has components of genera $g_1,\dots,g_k$. Consider the short exact sequence
$$
0\to O_C\to \pi_* O_{\tilde C} \to T \to 0
$$
where $T$ is a torsion sheaf supported at the singularities of $C$. We obtain
$$
\sum_{i=1}^k (1-g_i) - \dim H^0(C, T) \geq -\frac{p q (p+q-4)}2
$$
Each self-intersection of $C$ contributes at least one to $T$, so the number of self-intersections is bounded by
$$
\sum_{i=1}^k (1-g_i) + \frac{p q (p+q-4)}2 \leq k + \frac{p q (p+q-4)}2.
$$
This is basically elaboration of Will Sawin's comment, so I am making this a community wiki.