The limit is six under the treaty (although that also limits the tonnage to 10k). Being able to field six actual Battleships lets Germany claim "Hey we're back," while seeming like a perfectly acceptable modification the British. Although swapping two of them for carriers is certainly possible...