I want to count all the occurrences that take place in each period defined by a vector of dates. The vector indicate the first day of each period. The result should be a vector of same length of the input vector and with the number of occurrences. I want to count all the occurrences that take p