First version for global_frec function. It returns an associative array with words as keys and the number of documents where the words appear as values.