I don't know how to determine the size of the program in words, given the size of the .hex file, but normally you don't need to know that.
If you are the programmer, the compiler (or assembler) tells you if your program fits the memory or not. If you have got only the .hex file, then it should be compiled / assembled for your processor, otherwise you can't use it. And if it is compiled / assembled for your processor, its author surely have obeyed the size limits, so you don't need to worry about that.