Mail.app and number of mails ?

In Leopard is there any way to use Applescript to see how many mails are in a given mail folder, i.e. inbox. I need to do a script with Quickeys that says if there is 1 or more mails then run the script, if 0 don’t. The Quickeys forum suggests it needs an Applescript but I’d have more luck speaking Japanese then understanding Applescript advanced programming, so any help would be appreciated!

Cheers, Darren

There are a couple of types of top mailboxes.

tell application "Mail"
	set mailCount to count of messages in mailbox "INBOX" of account "Yahoo"
	
	set otherMailCount to count of messages in mailbox "inStaffReportFolder" of mailbox "09WEFrecords"
end tell

{mailCount, otherMailCount}

--{12, 13}

THANKS. I will pass this onto Quickkeys and hopefully they can help me implement it.