const n = $('.myclass').length; // This is probably what you should do
const n = $('.myclass').size();