The number of string light strands you can connect together depends on the wattage of the individual bulbs and the number of sockets in the strand. The maximum wattage a string light strand can handle safely is 1080 watts in total.
This chart will help explain how many sets can connect. If you are using LED bulbs that only use 1 watt and have a strand with 24 bulbs you can connect up to 45 sets (24 X 45 = 1080). However, if your bulb wattage is 40 watts you can only connect one (40 x 24 = 960).
Upgrading to LED bulbs will reduce the maximum wattage per bulb enabling you to connect more strands together.
This chart is for string lights with 24 sockets. Please be advised that if your strand has more sockets you will need to adjust the math! The max wattage is 1080 watts in total.