count in new window, implement is not excellent, because init window too much times