for each movement increment its respective counter
if ( move . charAt ( i ) == ' U ' ) countUp ++ ; else if ( move . charAt ( i ) == ' D ' ) countDown ++ ; else if ( move . charAt ( i ) == ' L ' ) countLeft ++ ; else if ( move . charAt ( i ) == ' R ' ) countRight ++ ; }