count number of instances correctly(was *# of cores)