Takes input (Word) (Number) then returns the corresponding value for each word.
Accounts for multiple inputs of the same word and updates the value accordingly.