Jerry,
As for the syntax, the following would work (and there are probably several ways to code this)...
object oTemp = ocommand.ExecuteScalar();
int count = int.Parse(oTemp.ToString());
It appears you *can* make successive pass-through calls to INSERT and then SCOPE_IDENTITY for a single connection/task where you know you're the only person inserting into the table (maybe for a data conversion)...
...but Bonnie's suggestion is still the better one, to wrap up the insertion and the call to scope_identity as a transaction within a stored proc, and have the stored proc return the scope_identity. That's the best approach.
Kevin