Fixing counter when using session id see BT#8892