add AttachmentsCountByOwnerIds method