A function $f(x)$ is defined by the following formulas
$$f(x) = \begin{cases} x^{2} + 1 & \text{when } x \text{ is irrational} \\ \tan(x) & \text{when } x \text{ is rational} \end{cases}$$
At how many $x$ in the interval $[0, 4\pi]$ is $f(x)$ continuous?