how to record number of times using application in c#

C#
how to record number of times using application in c#
Source

Also in C#: