Lead Status automation

Curious if anyone has built any lead scoring / status automation, particularly related to # of engagements in relation to time

For example, we want to tag a lead as “Warm” if they have engaged with us more than 3 times in last 30 days

And let’s assume we have a custom object that tracks every of their engagement

How would you build this in a workflow? i.e. how do you count the # of times of their engagement in last X days, and depreciate that value if 30 days past?

Appreciate any inputs here!