JSFiddle - React, Tailwind, and code Playground

HTML

<div class='container' id="container">
</div>
<div class="range" id="range">0</div>

CSS

.range {
    position: fixed;
    top: 20px;
    left: 20px;
    font-size: 50px;
}

.container {
    height: 20000px;
}

JavaScript

var totalRows = 100000000;
var totalHeight = window.getScrollSize().y;

window.addEvent('scroll', function() {
    var height = window.getScroll().y;
    var startingRow = parseInt((height/totalHeight) * totalRows);
    $('range').set('text', startingRow);
});