Need 9 pins for the two 7-segment displays. (actually, I'd only need 8 if I could figure out how to use just one multiplexing pin to toggle either 7-seg-A or 7-seg-B). Or only 5 if I got a decoder and did the A/B with one pin, but then I couldn't do the letters for the settings menu.
Need 2 pins for frequency up/down, strength up/down, pulse rate up/down, pulse duty cycle up/down.
Need 1 pin to select between frequency(Fr)/strength(Sr)/pulse-rate(Pr)/pulse-duty-cycle(dc) in the settings menu.
Need 1 pin for output enable (which might have both an on/off and a momentary switch on it) OE is done via a simple switch that can interrupt the PWM output of the microcontroller. It doesn't need to be internalized into the µC (or 2, if there's an XOR needed between the toggle and momentary switches)
Need 1 pin for PWM output.
Possibly need 1 pin for D/A output for strength, if duty cycle modulation won't do it.
Possibly need 2 pins for a crystal oscillator (since the following timing-critical activities take place: updating the LED outputs, pulsing the PWM output, and maybe reading the input switches)
Max 16 pins needed (of total 16 on an 16F628). Probly 15 optimally if momentary-off isn't needed. Though if we're sure that we don't need any more functions, then we could use all 16 in order to save a bit of wiring.