@Jebarohith19 Function(variable) is Called as a Lambda Expression, It can Generally be used or accessible where the input is a Collection that can be Iterable.
If i have to Explain what is Actually Happening in the Liq Query above, it’s better if you leanr the Linq using Tutorial Website. But I can tell you What is being performed by the Linq Query.
Since Item is a MailMessage , It Contains Attachments as one of its Methods which provides us the AttachmentCollection , which basically is a List which can be Iterable. Hence we can Iterate and Find the Condition what we need using the “Where” Clause Which accepts a Lambda expression with a Boolean Condition.
Hence the Output of the Linq Query will be the Attachment List Satisfying the Boolean Condition. Since it is a List, We can have a Count of it. I Hope this Explanation is Understandable
I suggest you to take basic tutorials of Linq, one of which i have suggested below and understand how the whole process works