Multithreaded counting integral.