Fix count orders & flags used