Sleep counter functional