I'm not entirely sure why you'd need to specifically blink your headlights 8x or 16x, but there is indeed a way to do this using the Logitech Gaming Software. Launch LGS, select your G29 and the game profile you want to set the button for. Hover over the button you'd like to map the function to, click the drop-down arrow and then select Assign New Command.
In the Command Editor window click Multi Key then give your new function a name. Then click the Start Recording button and press the key that's mapped to your lights the number of times you require, for example x8 or x16. Note that pressing the key once will record a downstroke and an upstroke. Once your done click Stop Recording and then OK to save the new command and map it to your button.
Just remember the key you use must be mapped to the lights function in your sim, and the command must be associated with the correct LGS profile for your sim as well. There are other cool things you can do like set time delays between presses, or you could even create a new command that continuously switches the lights on and off which you could toggle from your wheel. Have fun