i tried the same thing and came to the following conclusion:
You cannot give the result of a dynamic SQL-Statement back to the calling SP.
I'm using the following workaround in my SPs:
creating a tempTable in the SP,
inserting the result of the dynamic statement into this temp table,
reading the tempTable after the dynamic-statement into a local variable.
declare @anz int
declare @command varchar(255)
create table #temp_table (d_value int null)
select @command = "insert #temp_table select count(*) from myTable1"
select @anz = d_value from #temp_table