Use NSUserDefaults to store the amount of times the app has been opened, and increment it everytime in - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
Then do whatever you want to do whenever its been opened 5 times :]
Ex:
NSInteger timesLaunched = [[NSUserDefaults standardUserDefaults] integerForKey:@"timeslaunched"]
timesLaunched++
[[NSUserDefaults standardUserDefaults] setInteger:timesLaunched forKey:@"timeslaunched];
if (timesLaunched % 5 == 0) {
// Show Ads
}