Do not overflow the counter of extra particles by using a size_t where appropriate. Closes #627 See merge request !960