Set up for counting iterations of a phrase (Note: setup, not full implementation of this function yet)

Code now converts document into a stream of text (instead of xml) so it
can be scanned and iterations of phrases can be found.

There is problem with finding the iterations. There is an issue with
type and tuples when calling the doc.count(phrase) function.
added useful comments