A new study shows intermittent fasting is as effective as counting calories.