My youngest is taking introduction to logic this year and the professors that teach these classes seem to enjoy stumping the class during the first couple of weeks. This was one of the puzzles assigned as homework and it was causing a certain amount of anguish.
I thought you all might find it amusing because the subject of formal logic frequently comes up here in connection with the wild, circular reasoning most JW's use.
Farkel explained it pretty well:
If #1 is a liar, he'll lie when asked if he's a liar and deny it. Conversely if #1 is a truthteller, he'll answer truthfully when asked if he's a liar and deny it. Either way he'll deny it.
#2 accurately reports this denial.
#3 claims that #1 is a liar. Therefore either #1 or #3 is lying, but they both can't be lying at once. (If #1 is lying, #3 is telling the truth. If #1 is telling the truth, #3 is lying.)
The answer to the question then is, "One of them is a liar"
(Note the question asked how many of the three were lying, not who they were.)