Thom polynomial for contact algebraic structures Let's consider a algebraic contact structure $P$ on $\mathbb CP^3$
and a algebraic curve $C$ degree $d$ and genus $g$. Let's assume
that contact structure has degree $p$ (see
Polynomial contact structures on $RP^3$
about algebraic contact structure).
It seems that there is some constant $f(d,g,p)$  (maybe, even
polynomial!) such that if $C$ is tangent to $P$ at $f$ points then
$C$ is tangent to $P$ everywhere.
For example, it is easy to prove that $f(d,0,0)$ equals $2d-1$.
Somebody can expect that this question is about some homological
conditions : generic curve is tangent to $P$ at $a$ points, so, if it
is tangent to $P$ at $a+1$ points then it is tangent everywhere. It seems that it is true because pull-back of contact form to tangent bundle of $C$ is a holomorphic form, so it has some degree..
So, my questions are:
1) How can we prove that $f(d,g,p)$ exists? At least for some values
$d,g,p$? It seems that the case $p=0$ is the most easy.
2) Is it true that $f$ is a polynomial? (Thom polynomial of
something...) I'm sure that it is known or similar constructions are
already examined.
 A: I think that the answer to 1) is positive. $f$ could even be chosen not to depend on $g$ and the distribution would not need to be taken contact. This would be a consequence of the fact that the complex field has a so-called strongly minimal theory and that the tangency condition is closed.
A: Let $i:C \to \mathbb P^3$ be the normalization of an irreducible  curve $C_0\subset \mathbb P^3$ of degree $d$ and geometric genus $g$. 
If $\mathcal D$ is a distribution on $\mathbb P^3$ of degree $p$ then it is defined by a section $\omega$ of $\Omega^1_{\mathbb P^3} \otimes \mathcal O_{\mathbb P^3}(p+2)$. To compute the tangencies between $C_0$ and $\mathcal D$ we pull-back $\omega$ to $C$ using $i$. What we get is  a section of $\Omega^1_C \otimes \mathcal O_C(p+2)$. Notice that $\mathcal O_C(p+2) = i^* \mathcal O_{\mathbb P^3}(p+2)$ is a line-bundle of degree $d(p+2)$ over $C$.
If $i^* \omega$ vanishes identically then $C_0$ is everywhere tangent to $\mathcal D$. Otherwise, it is a section of a line-bundle of degree equal to $\deg(\Omega^1_C) + \deg(\mathcal O_C(p+2)$. As such it has exactly $2g -2 + d(p+2)$ zeros counted with multiplicities.  Therefore
$$
f(d,g,p) = 2g -2 + d(p+2) +1  
$$ 
is a polynomial. If one recalls that the genus of degree $d$ irreducible curve is bounded by $(d-1)(d-2)/2$ then one sees that
$$
f(d,g,p) \le d( p + d -1) + 1 . 
$$
This is in accordance with Serge R. claim that the bound can be taken independent of $g$.  
The argument above works equally well for integrable and non-integrable distributions, and also works for codimension one distributions on $\mathbb P^n$, $n\ge 2$.  
A: there is an article of Quo-Shin Chi "The dimension of the moduli space of superminimal surfaces of a fixed degree and conformal structure in the 4-sphere" where the dimension of contact curves moduli space is computed.
It lays between $2d-4g+4$ and $2d-g+4$ for a fixed complex structure on a curve
