Word count and indexing; from CloudMOOC