If you friend has been a resident for 2+ years, he is most likely a month to month tenant at this point. Any party may terminate a month to month tenancy with the proper 20 days notice regardless of fault (except in Seattle). It would be a very important point to determine whether the landlord is terminating the tenancy based on a 20 day notice or whether they are bringing an unlawful detainer action. Your friend would know based on the type of notice he received. A pay or vacate notice will usually give the tenant 3 days to pay the rent or vacate the property before any proceedings may begin. The landlord may choose not to accept anything less than full payment of the amount alleged in the 3 day notice.
This is probably a matter in which your friend will want to seek the advice of a local attorney. A local attorney will be able to counsel and advise your friend as to the possible options he may seek in order to defend against the eviction, whether an eviction is actually occuring, and the possible ramifications of such actions.
To answer your question regarding a counter-claim for wrongful eviction, it appears as though your friend has not been evicted yet. If he feels that he has a strong case, he may defend against the action but keep in mind that attorney fees are often times recoverable for the prevailing party in an unlawful detainer action, the lease most likely has a provision governing that also.