Use interlocked class to avoid race condition

Will hopefully eliminate the possibility of procCount not being what is expected after all processes exit