$count(a2j5j32h569,0,1,2,3,4,5,6,7,8,9)
or with regex:
$regex(a2j5j32h569,/\d/g)

I'm not sure which is faster.