4. Given $a, b, c, d \in \mathbf{Z}$,
$$
f(x)=a x^{3}+b x^{2}+c x+d \text {. }
$$

Then among $A(1,1)$, $B(2009,1)$, $C(-6020,2)$, $D(2,-6020)$, at most $\qquad$ of them can be on the curve $y=f(x)$.
4.3.

If $A$ and $C$ are both on $y=f(x)$, then $f(1)=1, f(-6020)=2$.
It is easy to see that $\left(x_{1}-x_{2}\right) \mid \left(f\left(x_{1}\right)-f\left(x_{2}\right)\right)$. Therefore, $[1-(-6020)] \mid (f(1)-f(-6020))=-1$, which is a contradiction.
Thus, $A$ and $C$ cannot both be on $y=f(x)$.
Similarly, $B$ and $C$ cannot both be on $y=f(x)$.
Therefore, at most two points $(A, B)$ out of $A, B, C$ can be on $y=f(x)$.
In this case, $(x-1)(x-2009) \mid (f(x)-1)$.
Let $f(x)=a(x-1)(x-2009)(x-t)+1$.
Substituting $D(2,-6020)$ into equation (1) yields
$a(2-t)=3$.
Thus, when $a=1, t=-1$, $A, B, D$ are on the $y=f(x)$ defined by equation (1).