set a variable, and on the passage of the transition to the next day add a condition so that this variable is added by 1. Such questions are better not in the comments.