Convert json_decode() result to array before sizeof

Use to count associative array, decoded by json into stdClass.