Added the capability to count the number of selected

Reviewer: Tiff Go (post commit)

Issue: GCP-8853