As model name already declares this as attachment model (AttachmentListModel) and as far as I understand it is per message. This could be simply

Q_PROPERTY(int count READ count NOTIFY countChanged FINAL)