change number:range to count, and make range functions take a length again