Calculate options in dropdown with scroll

Hi,

I found this is similar: Counting total number of options available in dropdown - #2 by kazurayam