Facebook is countersuing Yahoo over web technology patents it claims Yahoo is using to generate billions of dollars in revenue.