Hello Manesh,
Do a retrieve of //System.Session with any conditions you have in mind, apply your count as you would in any other case, then either use the GetCurrentSessionID action from Deeplink if you have the module, then retrieve the appropriate session and delete it, or in java use the following code:
getContext().getSession().destroy();
Hope this helps