Add a counter for how many times the user goes idle or active.

This can be used to check whether the user became active since the
last time you checked.