find any/all element with custom attribute + jquery

$('*[data-test-id]')

$('*[attr-name]') - result is an array, we can get length of it.