added elasticsearch count api