I'm not sure how to go about finding the solution to this question.
Let R be a ring with identity such that $x^2 = 1_R$ for all $0_R \neq x\in R$. How many elements are in $R$?
I've just been playing around with squaring elements, like $$(x+1_R)^2 = x^2+2.x+1_R =2.x+2.1_R = 1_R.$$
But I'm not sure where to go with this. Any help?