Question: I would like to create a filter which will react if received message has 2 attached files (and not zero, one, three etc.). I am aware about `has:attachment` option. But is there `has two attachments` (or something similar) option?

Answer: 
There isn't a method for number of attachments, although the filter options from Gmail are actually really good. What you can use though is `filename:.doc`, `filename:.pdf` etc. so if you’re looking for two attachments of two different filenames you can use `filename:.doc OR filename:.txt` which will filter those emails out for you.
MetisMe Attachments App can solve your concern. It folders all attachments in one folder giving details about each of them. You can then do whatever you want with the attachments (download, delete, forward, share on cloud). Give it a shot