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

Fixes #2060.