multithreaded leafcount