appointments+ counting appointments for a timeslot

Hello,
Thank you for your amazing support so far. I need to count the number of appointments made in one timeslot. Does this exist already in the code ?
Thanks.