I saw an article in the current New Scientist about the calorie content of food.
Apparently the current procedure for calculating the calorie content is based on some quite old and out-of-date assumptions. It involves measuring the fat, protein and carbohydrate content of the food, and then multiplying by some constants (9, 4, and 4 calories per gram) based on the chemical energy of these substances and the presumed absorption rates. However, the absorption rates are not accurate, and not enough account is taken of the metabolic cost of digesting the different nutrients.
The result is that most calorie counts printed on food labels are too high, particularly for protein, which would be better estimated at 3.2 calories per gram. But it also depends (not surprisingly) on the texture and structure of the food.