Added support for counting process threads

Hey guys, I needed to count the number of threads of some processes, maybe it's useful for someone else.

I didn't add the count to cygwin; I don't know if it works on that.