Design a hash map to count how many times a word appears in a text file.
Implement count_words(text), where text is the file contents as a string. Treat words as alphabetic sequences that may contain an internal apostrophe, ignore punctuation, and count words case-insensitively. Return a dictionary mapping each normalized word to its frequency.
def count_words(text):