Finding and storing the multiplicity of words from a file