Working version of count; new file for sample.