Print over previous output while evaluating?

I am running something like

For[count=1,count<=5000, count++,  
       Print["count = ",count];  
      pass  
]  

where “pass” takes a few seconds to run. So the whole thing takes some hours. Printing “count” gives me a warm feeling that it is moving along. But it fills the screen in an unpleasant way. What I would like to happen is that
count =1
appears on the screen, while pass runs for the first time, and then
is REPLACED ON THE SCREEN (OVERWRITTEN) by
count=2
while pass runs for the second time, and so on. So I get the warm feeling of watching count increase, without filling the screen.

How can I make this happen?

Thanks

Check out Monitor

Thanks. Looks like exactly what I want …

Hans suggestion hits the bullseye, but Also consider PrintTemporary. It is not exactly what you asked for but it is useful as well for monitoring progress.

Regards,

Neil

There is also Dynamic:

Dynamic[count]

For[count=1,count<=5000, count++,  pass]

I haven’t tried Monitor, that could be better, but as another option I’ve been using my own little function for that forever:

pdr[expr_, symbols_List : {}, interval_ : Infinity] := 
 PrintTemporary[
  Dynamic[Refresh[expr, TrackedSymbols :> symbols, 
    UpdateInterval -> interval]]]

Before my code I use e.g. pdr[x,{x}], which shows x and updates whenever it does, or pdr[ListLinePlot[data],{},5] which updates a plot every 5 seconds, or whatever. It disappears when the block is done running.