you have to write a program which tell about how many times it has run. ex:
if you run first time it will print 1.
if you run second time it will print 2.
like this.
this can easily done by File Handling but think other solution like IPC.
after booting your system, your program's output start from 1.