How to add leading zeroes to a number in adafruit ssd1306 OLED

Alternative to @Koepel's suggestion you can;
Write all zero's to the display.
Set the cursor to where you want your count to be displayed then print the count.
Note the cursor will have to know the length of your count to be displayed to be sure to start writing at the correct position.

Unless you find this easier I would probably go with @Koepel's suggestion with a slight variation:
Test your variable / display count .....

if(count< 10000) append xx leading zero's
if(count< 1000) append x leading zero's
if(count< 100) append x leading zero's
if(count< 10) append x leading zero's