word count formating problem and backwards compatibility for xml structure change