how to find out how many users and with what role?
How to calculate the number of licenses for these users?
You can filter the 'Employees and departments (amEmplDept)' for 'Status of the user account (seLoginStatus)' having "Active" (unless this aspect does not matter), and 'Role used at connection (DefMastProfile)'. You may also want to consider 'Authorized user roles (MasterProfiles)' for users having more than one role.
As for the license count, open 'AutoPass License Management Tool' (run as administrator) to see capacity for each license key.