ASP Return the number of key and item pairs

Return the number of key and item pairs

<html>
<body>

<%
dim d, a, s, i
set d=Server.CreateObject("Scripting.Dictionary")
d.Add "n", "Green"
d.Add "i", "Red"
Response.Write("Number of key/item: " & d.Count)
set d=nothing
%>

</body>
</html>