Term frequency problem

Closing this, since as far as I can tell it’s a duplicate of the question posed in this thread: