I have an activity that I uploaded to Garmin Connect (72-mile, 22 hour ultramarathon) where my watch recorded 10,115 calories burned. That shows up fine when I view the activity, but if I try to edit the activity (to correct the activity time to match my official finishing time) I get an error that the calories value is invalid. If I set it to 9999, Garmin Connect no longer complains.
Garmin Connect should allow the calories value to be higher, to account for ultramarathon activities. Perhaps 999,999 would be a better maximum value.