the character is redundant. so for example if you just had
vector<int> chars(256);
then for the letter 'a' you can say that chars['a'] = count_of_a;
if this is a so-called text file you don't need all 256, you may only need a shifted table to handle the letters you need. If it is any file, you need them all.
depending on the expected file size, the int in that vector could be unsigned{char, short, int, 64 bit int, big-int-class}. 32 bit ints are sufficient for MOST files today.