Here's a good 'formula' for figuring your calories and macronutrients.
You need .7-1.0 grams of protein per pound of lean body mass, as a minimum. Some think as high as 1.5grams while you are losing weight/rebuilding your body.
Look at Mark's carbohydrate curve to decide your number of carb grams. Fewer for weight loss, more if you are active is an acceptable starting point. Pick a spot, and try it for a while. Adjust up or down as needed.
Go to a calorie computer to figure how many CALORIES you need for your height, weight, and activity level. Subtract your protein and carb calories from to find out how much fat you use to finish off.
Example: 200 pounds, 40% fat = 120 pounds lean body mass
120 x 1.0 = 120 grams protein = 480 calories
Wanting to lose weight, going to try 50 grams of carb = 200 calories
5'8", 200 pounds = 1800 calories per day + 500 calories for being moderately active = 2300 calories
2300-680 = 1620 calories of fat
or, if you believe in calorie reduction, and not just carb restriction
1800-680 = 1110 calories of fat
And personally, I do NOT count the carbs from non-starchy veges or berries. To me they are freebies. Hope this is some good starting information for you.