Many people return from military service and join the police force. People who are now in civilian life and have shared military life often share military allusions.
I'd probably have to hear the inflection (and have not personally been in the military - but let's face it, we've all seen our share of movies), but I'm thinking in terms of the drill sargent and the trainee in boot camp. The seargant says "jump" and the trainee says, "How high, Sir?" The most common command in boot camp is probaby, "March!" - and the response is "Hup, two, three, four, hup, two, three, four."
So cop B is suggesting that cop A repeat the task correctly (thoroughly), and cop A's response in psuedo military jargon implies that cop B is acting like a drill seargant. (Sorry - couldn't think of a quicker way.)
I may be way off base.
I think that regardless of its etymology, "Hup" is favored for its staccato barking sound, and as an attention getter and clear, easy way to mark a rhythm.