Add back end api for wordcounts, close #20.