Remove count usage

Related to #856