Count if column 1 matches column 2

Jacob Slaathaug
edited 12/09/19 in Smartsheet Basics

I'd like to create a formula in a summary cell at the top of my sheet that counts rows in which the value in 1 column matches the value in another column at the same row. I'm hoping to do this without creating a helper column.  


Col1    Col2

1          1            =1

2          2            =1

3          0            =0

4          3            =0

5          5            =1

I'm guessing there is an obvious answer, but I can't find it. 

=COUNTIF(Col1:Col1, = ????)

I've tried using Col2@row, VALUE(Col2@row), some @cell combinations, but no success.

Any help would be appreciated. Thank you.