That should work fine. The setting of NOCOUNT is irrelevant. This only affects the n rows affected information sent back to the client and has no effect on the workings of @@ROWCOUNT.
Do you have any statements between the two that you have shown? @@ROWCOUNT is reset after every statement so you must retrieve the value immediately with no intervening statements.