In what you are trying to send data from main application to popup and viceversa..
Can you post the sample code you are working on.
And regarding the no of rows in your datagrid is equal to the length of the DataGrids dataprovider.
For the number of rows in the DataGrid just look at the length of the dataProvider.
For passing data between popups and app, the gold standard is to use custom events, and add the event listener to systemManager.
Here are some tutorials on custom events I created:
If this post answers your question or helps, please mark it as such.
Greg Lafrance - Flex 2 and 3 ACE certified
Flex Training and Support Services