optimize global count aggregates by using a ESCountTask