'Google sheets, how to count "other" cells that dont match a range

It's simple to count all cells that match a certain value, but how do i could all cells that dont match one of the values within a range?

enter image description here

For example, how do I could cells not equal to red blue or green?

Normally you can do =COUNTIF(A2:A10,B2) to count ones that match a cell, but as you see from the picture it doesn't work with a range.



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source