The reason they are called a V6 or V8 is because of the geometry of the engine itself. Notice how the pistons in the following image make a "V":
And here's some animations, cause everyone likes animations:
V6 Engine:
V8 Engine:
And here's what one side of the V8 looks like in an animation (Coincidentally, it's very similar to what an Inline 4 cylinder engine looks like from the side: