Add cli test to stats app.

Convert to double before squaring (corrects NAs).
Count structs and lists.