Answer
See the detailed answer below.
Work Step by Step
We know that during the acceleration of the protons, they must be gaining kinetic energy while losing potential energy until they leave the electric field area that pushes them to accelerate, and then the beam will move at a constant speed.
In other words, since the protons are accelerating, they must be traveling through a decreasing potential.
Hence,
$$\Delta K=-\Delta U_e$$
$$ K_f-K_i=-\Delta U_e$$
where $K_i=0$, and $U_{ef}=0$
$$ K_f-0=-\Delta U_e$$
$$ K_f = -q\Delta V$$
Hence,
$$q=\dfrac{K_f}{|-\Delta V|}$$
For one patient, it is desired to deposit 0.10 J of proton energy.
$$q=\dfrac{0.10}{|-1\times 10^7|}=\color{red}{\bf 10}\;\rm nC$$
where $q=Ne$ whereas $e$ is the charge of one proton and $N$ is the number of them.
Hence,
$$N=\dfrac{q}{e}=\dfrac{10\times 10^{-9}}{1.6\times 10^{-19}}$$
$$N=\bf 6.25\times 10^{10}\;\rm e^-$$