Forgot to declare selectedCount