how to get length of okobjectresult c#

C#
var count = (int)okResult.Value.GetType().GetProperty("count").GetValue(okResult.Value);
Source

Also in C#: