function num(){
let num = document.getElementById('num');
console.log(num);
num.innerHTML = parseInt(num.innerHTML) - 1;
}
setInterval(num, 1000);
body{
font-size: 400px;
display: flex;
justify-content: center;
align-items: center;
height: 100vh;
}
<span id="num">5</span>