Hey there. Just one, possibly two, simple things you need to adjust. First of all your counter, x, isn't being added to in the code you share, but if the loop isn't hanging on endlessly, perhaps you're updating the value of x in your while loop but simply forgot to add that code to this example.
But the thing that's definitely giving you a headache is that you need to assign the xth value to the xth place in List. That is, you need to have the loop write each result to List[[x]].
I've done so below. Also note that I've changed it to a for loop where x is a vector that goes from 1 to 149.
List = list()
for (x in 1:149) {
List[[x]] = test[[x]][["data"]][[1]][["count"]]
}
Hope that helps 