4. For any given irrational numbers $a, b$ and real number $r$ $(r>0)$, the number of rational points on the circle $(x-a)^{2}+(y-b)^{2}=r^{2}$ is ( ).
(A) at most one
(B) at most two
(C) at least two, finite in number
(D) infinitely many
4.B.

For a point $M(a, b)$, let $P(M, r)$ denote the number of rational points on the above circle.

First, construct a circle that meets the conditions and has at least two rational points.

For this, take points $A(0,0)$ and $B(2,2)$. The equation of the perpendicular bisector $l$ of segment $AB$ is $x+y=2$. On the perpendicular line $l$, take point $M(1+\sqrt{2}, 1-\sqrt{2})$, and let $r=MA=\sqrt{6}$. Then, the circle with center $M$ and radius $r$ has at least two rational points $A$ and $B$ on its circumference.

Second, show that for any irrational point $M$ and any positive real number $r$, $P(M, r) \leqslant 2$.

For this, assume there is an irrational point $M(a, b)$ and a positive real number $r$, and on the circle with center $M$ and radius $r$, there are at least three rational points $A_{i}\left(x_{i}, y_{i}\right)\left(x_{i}, y_{i}\right.$ are rational numbers, $i=1,2,3)$. Then,
$$
\begin{array}{l}
\left(x_{1}-a\right)^{2}+\left(y_{1}-b\right)^{2} \\
=\left(x_{2}-a\right)^{2}+\left(y_{2}-b\right)^{2} \\
=\left(x_{3}-a\right)^{2}+\left(y_{3}-b\right)^{2} .
\end{array}
$$

From the first equation, we get
$$
\begin{array}{l}
\left(x_{1}-x_{2}\right) a+\left(y_{1}-y_{2}\right) b \\
=\frac{1}{2}\left(x_{1}^{2}+y_{1}^{2}-x_{2}^{2}-y_{2}^{2}\right)=t_{1},
\end{array}
$$

From the second equation, we get
$$
\begin{array}{l}
\left(x_{2}-x_{3}\right) a+\left(y_{2}-y_{3}\right) b \\
=\frac{1}{2}\left(x_{2}^{2}+y_{2}^{2}-x_{3}^{2}-y_{3}^{2}\right)=t_{2} .
\end{array}
$$

Then $t_{1}$ and $t_{2}$ are rational numbers.
If $x_{1}-x_{2}=0$, then from equation (1) we get
$$
\left(y_{1}-y_{2}\right) b=t_{1} \text {. }
$$

Since $b$ is irrational, $y_{1}-y_{2}=0$.
Thus, $A_{1}$ and $A_{2}$ coincide, which is a contradiction.
Similarly, if $x_{2}-x_{3}=0$, we can get $A_{2}$ and $A_{3}$ coincide, which is a contradiction.

If $x_{1}-x_{2} \neq 0$ and $x_{2}-x_{3} \neq 0$, from equations (1) and (2), eliminating $b$ we get
$$
\begin{array}{l}
{\left[\left(x_{1}-x_{2}\right)\left(y_{2}-y_{3}\right)-\left(y_{1}-y_{2}\right)\left(x_{2}-x_{3}\right)\right] a} \\
=t_{1}\left(y_{2}-y_{3}\right)-t_{2}\left(y_{1}-y_{2}\right)
\end{array}
$$

which is a rational number.
Since $a$ is irrational, we have
$$
\left(x_{1}-x_{2}\right)\left(y_{2}-y_{3}\right)-\left(y_{1}-y_{2}\right)\left(x_{2}-x_{3}\right)=0 \text {. }
$$

Thus, $\frac{y_{1}-y_{2}}{x_{1}-x_{2}}=\frac{y_{3}-y_{2}}{x_{3}-x_{2}}$.
Then, $A_{1}$, $A_{2}$, and $A_{3}$ are collinear, which contradicts the fact that $A_{1}$, $A_{2}$, and $A_{3}$ are on the same circle.

Therefore, the assumption is false, meaning that such a circle can have at most two rational points.

Thus, for all irrational points $M$ and all positive real numbers $r$, the maximum value of $P(M, r)$ is 2.