Internet Direct (Indy) Version 9.0.1 Beta
TIdMessageParts.AttachmentCount
Indicates the number of attachments in the message part collection.

property AttachmentCount: integer;
Description
AttachmentCount is a read-only Integer property that identifies the number of attachments in the message parts collection. AttachmentCount is updated in TIdMessage.GenerateHeader, and indicates the number of TIdAttachment items that do not contain a Content-Id header in the ExtraHeaders property. Attachments with a Content-Id are included in RelatedPartCount.