There is nothing wrong with parseInt(document.getQuerySelector(".item > .item__quantity"), except for it not being parseInt(document.getElementById("uniqueAutogeneratedId")).
Developers just shouldn't write that kind of fragile code by hand. But there's nothing wrong at all with the code being there.