User Activity

I would like to implement a bootloader for STM32F103C8T6 that would count and keep in a special protected area how many uploads has done over its flash memory. Does anybody would give some some reference about this matter ? Thanks a lot. Antonio