pseudo code:
onAppStartOrResume () {
var days_online = /* Get the Array from any possible Storage*/;
if( typeof(days_online) === "undefined" || days_online == null) days_online = [];
if(days_online.indexOf( /*Date of today */) == -1){
days_online.push(/* Date of today */);
// save days_online again.
}
}
Try sth. like this, but keep in mind that when you want it more secure or you give them good bonuses you might want to count it on a server instead of localy like my pseudocode.