Fix bug where session_count wouldn't be incremented on app resume.

Fixes #2060.
`numberForKey` for great type safety justice