int main()
{
    map<string,size_t> count;
    string word;
while(cin >> word)
    count[word]++;   --------(1)

    for(auto it=count.begin();it!=count.end();++it)
        cout << it->first << ":  "<< it ->second <<endl;

I donot understand the code particularly the line (1)
Could anyone can explainÉ

count[word]++;

means you are adding a word into count and incrementing the size.

Look at the example in this link of how contents are added using <map>:
Click Here

Do you know what a map is?

Explain it further,so I can tell you the write code