How can I use a variable in another ViewController?

Hi! I am creating a quiz. I need a variable for the number of questions the user chooses. I have linked the buttons that allow this to a ViewController. How can I make sure that I can use that variable in another ViewController (where the code is written for the questions)?

If you’re storing questions in an array, the number of questions could be implied by the size of the array. Here is an example of that:

An instance of Quiz may be shared among view controllers.