Count Of Stocks Each Bar

Is there a way to count the number of stocks on any given day (bar) historically and put it to an array?
When I use categoryAll, it gives me the total stocks in my database but not which were the existing stocks on a day in the history. Something like on 1 Jan 2000, only x stocks were active (or listed) from the whole symbol category. Trying to calculate the % stocks fulfilling my criteria from the total stock universe on that day.

symlist = CategoryGetSymbols( categoryAll, 0 );
ListQty = StrCount(symlist, ",") + 1;

See here