sensor: small fixed to prevent rep_count overflow