The most accurate way is to calculate the calories for the entire batch, and then weigh or measure the entire recipe. If, just an example, the whole batch contains 5 cups, and 750 calories, that would be 75 calories for a half cup serving, or 150 calories per cup.
I like to use a food scale, so I usually calculate the calories per ounce or per 100 grams and then base my serving size accordingly.
In many cases (especially if the recipe isn't quite high in fat) estimation counting works just fine (once you get the hang of it). If I make lentils for example, there may be a small amount of meat or fat as well as some onions and other seasoning in the recipe, but I'll just use the calorie count for plain cooked lentils. I feel safe in doing so because I know from experience (doing the exact math to check the accuracy of my guesswork) that the math comes out close enough.