How many ASs are out there?

if, by active, you mean being used on the global internet today, a dump of a
friendly router's bgp data and trivial script should answer that, n'est ce

The CIDR report already does this. The only portion I believe it lacks in
this area is number of "allocated" ASs...