title: How to get resultant row count when reading data from any BigQuery table and write to destination BQ table (Using bigquery.QueryJobConfig())?
body: <p>I am doing some read write operations on BigQuery using python client libraries, I would like to know how many rows the "bigquery.QueryJobConfig()" API is reading from source BQ table.</p>
  
  <p>I already tried "query_job._query_results.total_rows" which is a protected member, but its giving me count of total number of rows available in destination BQ table. I also tried "results.total_rows" but it always gives me None as output even though the records are there in source BQ table. I have also tried "result = job.result(), page = result.pages" but as such no expected output.</p>
  
  <pre><code>def main(request):
  
      query = "select * from `myproject.mydataset.mytable`"
      client = bigquery.Client()
      job_config = bigquery.QueryJobConfig()
      dest_dataset = client.dataset(destination_dataset, destination_project)
      dest_table = dest_dataset.table(destination_table)
      job_config.destination = dest_table
      job_config.create_disposition = 'CREATE_IF_NEEDED'
      job_config.write_disposition = 'WRITE_APPEND'
      job = client.query(query, location='US', job_config=job_config)
      job.result()
      results = query_job.result()
      print("Got {} rows.".format(results.total_rows))
      print("Got {} rows.".format(query_job._query_results.total_rows))
  
  
  </code></pre>
  
  <p>I want count of total number of rows my query is reading from source table(<code>myproject.mydataset.mytable</code>)</p>
  
  <p>Based on my knowledge I am preparing one workaround is that to get the resultant row count first I will count rows in exists in destination table before I perform write to BQ operation and again will count rows from destination table after write to BQ operation. The subtraction of both will give me resultant row count (newly_added_rows = (row_count_after.num_rows - row_count_before.num_rows)
          print("{} rows are found as query result".format(newly_added_rows))) and (if row_count_before.num_rows == row_count_after.num_rows) then query executed with empty result set.
  Just Wanted to know whether I am following right approach ?</p>