can any 1 here give me the algorithm to the below :

i need to develop a app it say : there ll be 2 pic against each other and by clicking on 1 pic
the count no. increases