fix: Fix error in count with single item or all items with the same value.