Added function to create the node wide document count for each word.