Lets say I have this data set:

```
  col1 col2 
1   2    1 
2   1    1 
3   1    2 
4   1    2 
5   1    2 
6   1    1 
7   2    1 
8   2    2  

```

How would I go about creating a column that counts the number of times either "1" or "2" appears across the columns, such that it looks like this:

```
  col1 col2 count_1 count_2
1   2    1     1      1
2   1    1     2      0
3   1    2     1      1
4   1    2     1      1
5   1    2     1      1
6   1    1     2      0
7   2    1     1      1
8   2    2     0      2

```