Returning value from function

function commentCount(feedUrl){		
	
	var feed = new google.feeds.Feed(feedUrl);
	var count;

	feed.load(function(result) {
		count = result.feed.entries.length;
		return count;
		
	});
	
	return count;
	
}

I would like the commentCount function to return a value, which is the variable count, however I couldn’t get it done, the function returns “undefined” everytime.
Is there any workaround on this? Any help would be appreciated~~:lol:

Alert your count and see what you get. I suspect that this piece of code is not executing at all.


feed.load(function(result) {
		count = result.feed.entries.length;
[B][COLOR=red]alert(count);
[/COLOR][/B] 	return count;
		
	});