Farmer's Sheep

Farmer Longmore had a curious aptitude for arithmetic, and was known in his district as the "mathematical farmer." 
The new vicar was not aware of this fact when, meeting his worthy parishioner one day in the lane, he asked him in the course of a short conversation, "Now, how many sheep have you altogether?" 
He was therefore rather surprised at Longmore's answer, which was as follows: 
"You can divide my sheep into two different parts, so that the difference between the two numbers is the same as the difference between their squares. 
Maybe, Mr. Parson, you will like to work out the little sum for yourself."

Can the reader say just how many sheep the farmer had? 

Supposing he had possessed only twenty sheep, and he divided them into the two parts 12 and 8. 
Now, the difference between their squares, 144 and 64, is 80. 
So that will not do, for 4 and 80 are certainly not the same. 
If you can find numbers that work out correctly, you will know exactly how many sheep Farmer Longmore owned.

See answer

Math Genius