Great question! In some cases it is countable, and in some cases it is countable. (Isn't it just like English to have extra tricks like that!?)
I would say "Don't eat too much candy" because I'm talking about candy in general. When I'm talking about specific candies, like 5 candies that I am holding in my hand, I would say "candies".