Almost no stars actually collide when galaxies pass through one another. With light-years separating individual stars, there is a huge amount of empty space in a typical galaxy, so collisions between stars are statistically insignificant. It would be impossible to estimate how many life-bearing planets would be affected, though, since we have no idea how common life is in the universe, or even in our own galaxy. Assuming, say, one star in a million has a planet which supports life, I’d say again the odds of one being affected to the point of destroying all life on it are miniscule. This would probably only happen if the planet in question were to be ejected from it’s parent star system.