Since upgrading to Yosemite I've been having issue with OS X creating additional desktops on my main monitor for no apparent reason. I usually have 3 different desktops setup on my main monitor and just one on my second monitor. By the end of the day, OS X will usually have created 2-3 extra desktops automatically.
I can't find any setting or shortcut that might be causing this to happen. There also doesn't seem to be any reason for it since it can happen as soon as I boot up my computer.
Is there a way to set a maximum number of desktops so I can prevent this from happening?
Image from related question - Why does Mac Yosemite open dozens and dozens of empty desktops?