如何统计出数组中相同数字的个数?专家帮我看看这段代码怎么改
<%
dim a(6)
a(0)=1
a(1)=3
a(2)=6
a(3)=3
a(4)=5
a(5)=2
counter=1
for k=0 to ubound(a)-1
for i=0 to Ubound(a)-1
for j=0 to Ubound(a)-1
if strcomp(a(i),a(j))=-1 then
tmp=a(i)
a(i)=a(j)
a(j)=tmp
end if
next
next
response.write a(i)&" <font color='red'>"
response.write counter
response.write "</font><br>"
next
%>