My son recently worked as a supervisor at Kroger. He says that the system knows how many people are entering, exiting, and shopping in the store at any time. It knows how long the typical customer shops, and uses this to estimate when the next surge at the registers will occur. Before the surge happens, a display tells the supervisor when he needs to open another register, or two.
It also watches each line, to determine how long people are waiting for a cashier. The goal is a maximum of two minutes. If it sees that customers are waiting longer than that, the display notifies the supervisor to open another lane.
My own experience as a regular shopper at Kroger confirms that the system works very well, and it does indeed keep me coming back. I'm especially ready to go back to Kroger right after shopping at Wal-Mart, where their system apparently tells the supervisor to CLOSE lanes just as shoppers arrive at the registers!