Move global counts commented code into true api command named "counts"