I already found out how to count cases based on two conditions:
sum(dat2$happy > 7 & dat2$induction == 1)
But do you know how I can includ