Count Number of Elements in JSON string with Json.NET in C#
JObject jObj = (JObject)JsonConvert.DeserializeObject(myJsonString);
int count = jObj.Count;
BONUS:
dynamic jObj = JsonConvert.DeserializeObject(myJsonString);
foreach (var package in jObj)
{
Console.WriteLine("{0} {1}", package.First.type, package.First.quantity);
}