Well...he could still have 59 pieces of candy. Just because he ate 50 doesn't necessarily mean they were part of the 59 that he had in his possession!
OR
He still has 59 pieces. They're just in different locations: 50 in his tummy, and 9 left to put them there!