Use the AttachmentsCount property to count the attachments in the message. If the message has no attachments the AttachmensCount property returns 0.