TIMAPSend.StatusFolder
TIMAPSend

function StatusFolder(FolderName, Value: string): Integer;

Unit
IMAPsend

Description
Ask for given status of folder. I.e. if you specify as value 'UNSEEN', result is number of unseen messages in folder. For another status indentificator check IMAP documentation and documentation of your IMAP server (each IMAP server can have their own statuses.)