JSFiddle - React, Tailwind, and code Playground
HTML
<div id="wrapper">
Hover me
</div>
<div id="counter">
0
</div>
CSS
#wrapper{
height:100px;
width:100px;
background:#eee;
line-height:100px;
text-align:center;
}
JavaScript
document.getElementById('wrapper').onmousemove = function(){
counter.innerHTML = Number(counter.innerHTML)+1;
}