how to count the number of rows under certain condition?

Hi, perhaps something like this. I have created a pretend dataset, but next time provide a reproducible dataset.

library(tidyverse)

# pretend dataset ---------------------------------
df <- tibble(site_name = c("a", "b", "c"),
             `2020-09-30` = c(0, 1, 0),
             `2020-10-01` = c(1, 2, 0))


# pivot then only the ones less than 1 -------------
df %>% 
  pivot_longer(-site_name, names_to = "dates", values_to = "count") %>% 
  filter(count < 1)


# # A tibble: 3 x 3
# site_name dates      count
# <chr>     <chr>      <dbl>
#  1 a         2020-09-30     0
# 2 c         2020-09-30     0
# 3 c         2020-10-01     0
2 Likes