I have this data frame:

```
> df <- data.frame(o = c(0,1,1,1), e = c(1, 1, 1, 1))
> df
  o e
1 0 1
2 1 1
3 1 1
4 1 1

```

And I want to get counts using certain rules. I tried this:

```
out <- df %>% 
    mutate(L = case_when(o == 1 & e == 1 ~ 'a',
                         o == 0 & e == 1 ~ 'b',
                         o == 1 & e == 0 ~ 'c',
                         o == 0 & e == 0 ~ 'd')) %>%
    group_by(L) %>% 
    summarise(n())

```

I saved a lot of time by doing that but I get this:

```
> out
# A tibble: 3 x 2
      l `n()`
  <chr> <int>
1     a     3
2     b     1

```

How can I include 0 values (`c = 0` and `d = 0`) within the creation code of `out` in order to make it automatic for any letter (`a`, `b`, `c` or `d`)?