counts zeros and ones.