*Note that you will name this the object ID of whatever your straight table is.
Now open up settings->Document properties...->OnAnySelect**->Add Actions...->External->Run Macro->Macro name is temp then apply down the list. Now whenever you make a selection it will store the number of rows from "CH01" or whatever your straight table is into the variable NoOfRows.
**Keep in mind you can change when the macro gets run for your preferences by defining the same thing for OnOpen, etc..
I have attached a working .qvw for additional support