Returns the number of attachments. Using X00 will work for the messageID if the item view is showing.
AFTKN_ITEM_ATTACHMENT_COUNT or 667
WORD ItemAttachmentGetCount(ANSISTRING MessageID)
Unique item identifier, returned by ItemMessageIDFromView().
WORD.