The History Stats sensor can be used to report the daily count (and then it resets to start counting for the next day). What you want is to preserve each day’s total count so that you can show weekly/monthly/yearly information (in a graph). To do that, use the History Stats sensor in combination with the Utility Meter integration.
That’s what I do to record the total amount of time my heating (and cooling) system operates throughout the year.
You can use the History Chart card to display a graph (and there’s a more sophisticated charting solution called ApexCharts).