Предложу такой вариант...
const dt = [
[1, 2],
[1, 3],
[2, 4],
[2, 3],
]
let min = dt[0][0]
let max = dt[0][0]
dt.forEach(el => {
min = Math.min(min, el[0])
max = Math.max(max, el[1])
})
let t = 0
for (let i = min; i <= max; i++) {
let c = 0
dt.forEach(el => {
if ((el[0] <= i) && (i < el[1])) ++c
})
alert(i + ' - ' + c)
t = Math.max(t, c)
}
alert(t)