Add getThreadCount