yep - as above - a good HM will know your personal details (size,weight, age sex VO2max if known) and provide a Kcal figure - This figure is often disputed for accuracy on these forums, but I guess they are as good as it gets.
I have a Garmin edge 305 and it knows a lot of detail about me when I am out on the bike. My age, weight, sex and heart rate along with speed, altitude and total climb - it calculates Kcal expended over the ride from that info.
It's not the easiest to determine your total calorie requirement though - search for basal metabolic rate on the web and there are numerous methods of calculating your calorific requirement if you were sat still all day - some others that calculate your BMR with an anticipated 'office job' type lifestyle. Find one you like the look of, calculate your BMR and add any Kcals burned though exercise on your Heart monitor and there you go - the amount you have burned that day(ish..)
for intake - there is nothing to beat a comprehensive eating diary. I started creating one last year around september when I started cycling. It became a little obsesive I have to admit, weighing food etc and using the web to find out details of foods etc. It worked mind. I went from 13st6lb in september 06 down to 10st10lbs by december - reducing my waist size from about 35" down to nearly a 30" jeans! I'm still there now, although it fluctuates around the 11st mark which I am happy with as I looked a bit drawn under 11st..