I think you will want to explore the count-selected
and selected
functions. See the "Operators" section on this page for examples.
In the future, please do use the support template to get the best help possible! You can read more in About the Support category.