Could I write a program for control 8 arduino devices at the same time?

A Mega has 4 hardware serial ports.

The most number of Megas I have run (at the same time) on a PC is two, but then again I only have two Megas.

Each Arduino you plug into a USB port will have a different COM number.