Infinity more than a few times and there definitely is a way to auto upgrade every square. I turned off hover, in fact, and never have to manually upgrade any square.