count method and xml string support (as opposed to file only)