Move getThreadCount to threadController