You count the number of counters, then divide up the prevention during the announcement of the ability. Each targeted creature receives the appropriate amount of damage prevention when the ability resolves.