>>148
言ってる意味がよくわからないが・・・こういうことか?

// 初期化時
std::map<std::string,int> received;

// 受信の度に
if( received.count(key) == 0 ){
received[key] = 1;
} else {
received.count[key] += 1;
}

// 全受信完了後
for( std::map<std::string,int>::iterator it = received.begin();
it != received.end();
it++
){
std::cout << it->first << " = " << it->second << std::endl;
}