Counter to the rescue!

```python
from collections import Counter
c = Counter(installed_tags.values())
new_tags_count = c[int(session_id)]
```