public function getFieldCount($jsonResponse, $fieldName)
    {
        $arr = json_decode($jsonResponse)->{$fieldName};
        return count($arr, COUNT_RECURSIVE);
    }
public function getFieldCount($jsonResponse, $fieldName)
    {
        $arr = json_decode($jsonResponse)->{$fieldName};
        return count($arr, COUNT_RECURSIVE);
    }
public function getFieldCount ( $ jsonResponse , $ fieldName ) { $ arr = json_decode ( $ jsonResponse ) -> { $ fieldName } ; return count ( $ arr , COUNT_RECURSIVE ) ; }
This method parses XML for a count of a particular field.

@param string $jsonResponse JSON Response string.
@param string $fieldName Field to be found.

@return getFieldCount($jsonResponse, $fieldName) - String Value of the given Field.
This method parses XML for a count of a particular field .