Android code for rep counter