שם עצם is a medieval translation of Latin nomen substantivum and/or Arabic اسم الذات. Even the word noun, comes from Old French noun substantif (nom substantif in Modern French), descended from the same Latin term. Our conceptions of grammatical categories may have changed over the centuries, but we still use the old terminology.
Someone told me that דבר has the following meanings:
4. matter (French: affaire)
However, he added that the translation "word" is not very accurate, because דבר never means "word" in the sense of the French mot or Arabic كَلِمَة. Thus, you cannot use דבר to refer to the individual words of a sentence. So, if you wanted to say "This sentence contains five words." you would not use דבר. He explained that דבר means "word" in a different sense. He said it meant something like "speech". Is he correct?
No, it can literally refer to a word in a sentence. It's just not commonly used that way in a literal sense in Modern Hebrew, except maybe in some expressions. But in Biblical Hebrew it does sometimes have that meaning.