How to get variable selections in menu?

You can get the number of items in a dropdown with

document.getElementById("lst").length

You can run this command with executeScript. The challenge is maybe getting the right ID?

See also

OR (other method that works for sure but is slower):

Start with a high index and reduce it until the !statusOK is true. Then you have the number of entries in the dropdown. See here: