title: How to calculate number of rows obtained after a join, a filter or a write without using count function - Pyspark
body: <p>I am using PySpark to join, filter and write large dataframe to a csv.</p>
  <p>After each filter join or write, I count the number of lines with df.count().</p>
  <p>However, counting the number of rows mean reloading the data and re-perform the various operations.</p>
  <p>How could I count the number of lines during each different operations without reloading and calculate as with df.count() ?</p>
  <p>I am aware that the cache function could be a solution to not reload and recalculate but I am looking for another solution as it's not always the best one.</p>
  <p>Thank you in advance!</p>