Unfortunately we don't have the ID for List component, so you need to retrieve it by using eq(index)
If your list is the first one, you can specify the index as 0 (as per my example), and if it's the 3rd one, you would use index 2 for example:
$(document).ready(function() {
$('.entitylist.entity-grid').eq(0).on("loaded", function () {
let table = $(this);
let count = $(table).find('tbody tr').length;
console.log(`Number of records: ${count}`);
let multiplePages = $(table).find(".view-pagination").is(":visible");
console.log(`Multiple Pages: ${multiplePages}`);
});
});
I added some logic there with regards pagination as well, basically this logic only count the number of records within the current page, if the "multiplePages" variable is true, this means you have more records in other pages
Hope this helps, don't forget to like/mark the answer as the solution if it helps you