title: pyspark countApprox() does not seem to be different from count()
body: <p>I'm having trouble with the <code>count()</code> method of pyspark, which is way too slow for my program. I found out about the <code>countApprox(timeout,confidence)</code> one but it doesn't speed up the process. </p>
  
  <p>What i found doing a bit of research is that I should maybe use <code>rdd.countApprox.initialValue</code> but it doesn't seem to work, as in pyspark the result of <code>countApprox</code> is an int and not a <code>PartialResult</code> object (I guess it is different in scala or java)</p>
  
  <p>Does anyone know how to make <code>countApprox</code> work in pyspark ? </p>
  
  <p>My test code to compare :</p>
  
  <pre><code>a = sc.parallelize(range(1000000),10)
  
  import time
  t = time.time()
  print("there are ",a.count()," rows")
  print(time.time()-t)
  </code></pre>
  
  <p>gives : </p>
  
  <pre><code>there are  1000000  rows
  3.4864296913146973
  </code></pre>
  
  <p>but </p>
  
  <pre><code>b = sc.parallelize(range(1000000),10)
  
  import time
  t = time.time()
  print("there are ",b.countApprox(10,0.1)," rows")
  print(time.time()-t)
  </code></pre>
  
  <p>gives out :</p>
  
  <pre><code> there are  1000000  rows
  3.338970422744751
  </code></pre>
  
  <p>Which is pretty much the same time of execution...</p>