Script that count how many times router gave out IPs in limited time period?

Hi! Does someone know how to make script that counting how many IPs router gave out lets say in 3 months so after 3 months i could somehow see how many connections were there? I need that to make report every 3 months. Thanks!