For certain ordered pairs $(a,b)$ of real numbers, the system of equations
$$\begin{aligned}ax+by&=1,\\x^2+y^2&=50\end{aligned}$$
has at least one solution, and each solution is an ordered pair $(x,y)$ of integers. How many such ordered pairs $(a,b)$ are there?