Adjust empty signal detection for the wrapped value case -- added a more general purpose signal counter