count random pivot