If I search for counting the number of threads an application has, all the answers involve external programs like top. I want to count the threads within the ap
You could write a tiny wrapper for pthread_create that counts created threads and link against that wrapper after you linked against the immutable library.