When calculating the solar energy needed to charge a Tesla Powerwall 2, it's the rating of the panels in your solar PV system as much as the number of panels that determine how much energy they can generate to charge the battery storage system. The ratings of your panels, when added together, give a number of kW that can feed into the Powerwall battery, but some of this electricity will also be used by your building at the same time.