Hello,
Did you check the active session table in SQL?
If not please check and try to truncate the “Active Session” table of the current database from "SQL management studio".
See the below details might be helpful for you, NAV 2013 R2 and later - Session vs License count
Client types that do not consume licenses
A few client types do not consume licenses (anymore). For instance the service account starting a NST does not consume a license for it's own session. Neither for NAS services, even if the NAS is executing jobs from the jobqueue. Background processes do not consume licenses too. You get the idea.
Client types that do consume licenses
A few client types do consume licenses. For instance the Windows RTC, Web RTC, Tablet client, SOAP/ODATA calls, etc. A license will be consumed if an unique user makes a connection with NAV with one of the above client types. If this user on the other hand makes another connection with NAV with the same or an other client type, this won't consume another license. NAV counts unique users.
Example
For example if one user starts an session with a windows RTC client from a desktop machine, a session from his tablet with the app and start a job manually (creates a background process) the user will still consume 1 license.
What i do not understand from your post is that you say that you see less sessions in the active session overview than licenses available in the license and that you've issues with it... that is something I haven't seen before.
Query to view current consumed licenses
With the following query you can view the current consumed licenses. I'm not sure if it's waterproof, I just wrote it and did not test it. Feedback is welcome.
/*
Current consumed licenses NAV 2016
Client Types:
0 = Windows RTC
1 = Sharepoint Client
2 = Webservices (SOAP & ODATA)
3 = Client Service
4 = NAV application service (NAS)
5 = Background
6 = Management Client
7 = Web RTC
8 = Unknown
9 = Tablet RTC
10 = Desktop RTC
*/
SELECT COUNT(DISTINCT [User ID]) AS 'Current consumed licenses'
FROM [dbo].[Active Session]
WHERE [Client Type] IN (0,1,2,7,9,10)