Count Sensor Toggles? How?

So I have the GPIO reading my driveway detector. What I would like to do is have a “Counter” to display the number of times the driveway detector was activated each day (and reset to zero at midnight). Any idea how to build this in HA?

Thanks in Advance!
Calvin

Feature request: