title: In SSIS, how do I get the number of rows returned from the Source that SHOULD be processed
body: <p>I am working on a project to add logging to our SSIS packages. I am doing my own custom logging by implementing some of the event handlers. I have implemented the OnInformation event to write the time, source name, and message to the log file. When data is moved from one table to another, the OnInformation event will give me a message such as:</p>
  
  <blockquote>
    <p>component "TABLENAME" (1)" wrote 87 rows.</p>
  </blockquote>
  
  <p>In the event that one of the rows fails, and lets say only 85 rows were processed out of the expected 87. I would assume that the above line would read <code>wrote 85 rows</code>. How do I track how many rows SHOULD HAVE processed in this case? I would like to see something like <code>wrote 85 of 87 rows</code>. Basically, I think I need to know how to get the number of rows returned from the Source's query. Is there an easy way to do this?</p>
  
  <p>Thank you</p>