Key counter