Easy:
void run_me(void) {
static unsigned char execution_count=0; //execution counter
if (++execution_counter > MAX_RUN) return; //if total number of runs exceed, do nothing
//put your code here
}
All you need to do is to specify MAX_RUN.