Count Property

The Count property of the SPAttachmentCollection class gets the number of attachments in the collection.