Light-up decorations always seem to have weird bulb counts. When a bulb burns out, you’ll need to calculate the voltage for the new bulb by counting the length of the string. This was the decoration in question:
I briefly considered spending 10 seconds to count each light. But that was silly. I could do the same job in an hour using OpenCV! Having never used OpenCV before, it turned out to be a decent introductory exercise. Using some HSV ranging, and simple blob detection, I was able to get rough counting working. For those curious, I threw the (very hacky) program in a gist.