Allow user to define the number of cores used.