For the line from $(a,b)$ to $(c,d)$ the number of such points is $${\gcd(c-a,d-b)}+1.$$ Especially, if the $x$ and $y$ distances are coprime, only the endpoints are lattice points.
For the line from $(a,b)$ to $(c,d)$ the number of such points is $${\gcd(c-a,d-b)}+1.$$ Especially, if the $x$ and $y$ distances are coprime, only the endpoints are lattice points.