Nature and number of solutions to $xy=x+y$

Of course the simplest solution is to write the equation as $(x-1)(y-1)=1$.


The curve $xy-x-y=0$ is a hyperbola with asymptotes $x=1$ and $y=1$.

Its graph is so contained in the union of the strips

$$ (-\infty,0]\times[0,1), \qquad [0,1)\times(-\infty,0], \qquad (1,2]\times[2,\infty), \qquad [2,\infty)\times(1,2] $$

enter image description here

The only points with both integer coordinates are $(0,0)$ and $(2,2)$.

More analytically, consider the curve written as $$ y=1+\frac{1}{x-1}=\frac{-x}{1-x} $$ If $x>2$, then $x-1>1$, so $1<y<2$, so $y$ is not integer. If $x<0$, then $0<y<1$, so $y$ is not integer. For $0<x<1$ and $1<x<2$, $x$ is not integer.

Thus only $x=0$ or $x=2$ remain.