title: Azure Data Factory check rowcount of copied records
body: <p>I am designing a ADF pipeline that copies rows from a SQL table to a folder in Azure Data Lake. After that the rows in SQL should be deleted. But for this delete action takes place I want to know if the number rows that are copied are the same as the number of rows that were I selected in the beginning of the pipeline.
  Is there a way to get the rowcount fo the copy action and use this in another action (like a lookup)</p>
  
  <p>Edit follow up question:
  Bo Xiao's answer is OK. BUt then I have a follow up question. After the copy-activity I put an If Condition with the following expression:</p>
  
  <pre><code>@activity('LookUpActivity').output.firstRow.RecordsRead ==      @{activity('copyActivity').output.rowsCopied
  </code></pre>
  
  <p>But then I get the error: @activity('LookUpActivity').output.firstRow.RecordsRead == @{activity('copyActivity').output.rowsCopied</p>
  
  <p>Isn't it possible to compare output parameters of two activities to see if this is True?</p>
  
  <p>extra edit: I just found an error in this piece of code. I forgot a "{" at the begin of the code. But then the code is still wrong. To compare two outputs from earlier activities the code must be:</p>
  
  <pre><code>@equals(activity('LookUpActivity').output.firstRow.RecordsRead,activity('copyActivity').output.rowsCopied)
  </code></pre>