added the support for count in json & xml