upgrade datascript to 0.7.0
factor out view of count