numCoresToUse (and rxOptions, in general) is related only to setting up distributed computing for RevoScaleR functions. foreach and doParallel do not use it. To run your script in parallel mode, you will need to first register a parallel backend for your foreach command. Instead of setting numCoresToUse, use
library(doParallel} registerDoParallel(cores=6)
getDoParWorkers() should return 6 at this point. This sets up a "compute cluster" across each core, each of which can run an R process and communicate over sockets with the others. http://cran.r-project.org/web/packages/foreach/vignettes/foreach.pdf http://cran.r-project.org/web/packages/doParallel/vignettes/gettingstartedParallel.pdf
Some additional resources on using foreach and doParallel that will explain more options on running in parallel: