1) Configure the PWM to generate pulses "forever".
2) Configure the PWM to generate an interrupt on each pulse.
3) In the interrupt, count down from 99 (100-1). When it hits zero, configure the PWM to generate only one more pulse.
Is it possibile with teensy?
You'll need to write directly to hardware registers to accomplish this.
There are 3 timers that create the 12 different PWM signals. You'll need to look at the pinouts (the schematic is the best place) and the big table in chapter 10 of the chip's reference manual to figure out which timer (FTM0, FTM1, FTM2) and which channel from that timer you're actually using.
Each channel has a pair of registers, a 16 bit value that controls the PWM duty cycle (eg, FTM0_C5V is the value for channel 5 of the FTM0 timer), and an 8 bit register for settings (FTM0_C5SC is the settings for channel 5 of FTM0). One of those 8 bit enables the interrupt. You need to set that bit, and also use NVIC_ENABLE_IRQ() to turn the interrupt on.
Use attachInterruptVector() to configure your interrupt handler for the timer interrupt. The 3 interrupts are named IRQ_FTM0, IRQ_FTM1, and IRQ_FTM2, which you'll use with NVIC_ENABLE_IRQ and attachInterruptVector.
When the PWM compare match occurs (the falling edge), you'll get the interrupt and your function will run. The first thing you'll need to do in is clear the interrupt flag in the settings (eg, FTM0_C5SC). To turn PWM off, you'll write zeros to the config bits in that register. To keep PWM on, leave those bits as they are.
For testing, you'll probably want to leave you interrupt at the default priority level, or even configure it for a lower priority (higher numerical values are lower priority, zero is the highest priority setting). Then you can use Serial.print() or Serial1.print() inside your interrupt, because the communication interrupts default to higher priority.
Obviously for final use, you want your interrupt to be at a very high priority, so you don't risk getting 1 extra pulse if some other interrupt happens to be running when that last PWM falling edge occurs. Use NVIC_SET_PRIORITY. For example, NVIC_SET_PRIORITY(IRQ_FTM0, 0). Zero is the highest priority level.
However, keep in mind that using __disable_irq() prevents any interrupts from running, even if they're priority is zero (highest). To make this work, you'll need to make sure nothing ever disables interrupts for longer than the time from the last falling edge to the beginning of a new PWM cycle. If your interrupt is ever delayed that long, your code will run too late to prevent another extra pulse.