Optimized count users in session query