I2C-controlled digital counter
There is no purpose-built chip for this. However virtually any microcontroller can do this. My personal favorite is ATtiny85 which is available from local online dealers at half a dollar each and is compatible with Arduino environment.

Be careful when programming both this MCU and your host device, as you don't want communications to throw off pulse timing.

Another solution with more complicated circuitry, you can build one from a 74HCxx counter chip, a 555 timer for the pulses output as well as a clock for the counter, an I2C digital pot (setting the clock frequency and latching the number into the counter, an I2C I/O expander (setting the counter) and a few diodes.