Fixing issues created by last commit for #146

The translation was used in other contexts so the count needed to be
added.
Also discovered the scope groups by session id so I needed to only get
the size of the hash