Don't use a hardcoded core number.

Instead use `number_of_cores / 2`.

I used this since the previous was `2` too so on my 4 core machine I get 2.
Slightly verbose, but I think it's okay. It's readable.