check number of active threads