Rolling Count on varying window sizes

Hi, it might help if you included a reproducible example of your code (as in enough so that people can test out the code to get a solution)