alertcount: trim count to 7 bits and suppress unnecessary 0s