do you have running at the same time.
That is not the same as How many windows do you have open at the same time"
On a Mac, unlike Windows, closing an applications window by using the Red dot at the top left of the window, does not cause the application to Quit.
It just closes the window, the application is still running and eating up your RAM.
Take a look at the dock, notice that under some of the icons there is a little black triangle or a white mark?
You will always see one under the Finder face, first on the left hand end of the dock, and one under each of the applications that you have running.
Launch Mail and Safari and you'll see those marks appear. Now close the Safari window. Note that the mark is still there. Safari is still running.
Next time the beach ball appears, see how many apps you have running.