I'm looking for a way to count how many rows in my range (that runs over two columns) adhere to the criteria that one one cell in the row has a specific background color whilst the other cell in the same row has a different specific background color. 

As things stand, I have tried using colorfunction inside Countifs but they appear to be giving the wrong answer. Any suggestions?