use four characters for count row in refs buffer