backport of r51950
* regression bug, count_next was coercing a Py_ssize_t to an unsigned Py_size_t
  which breaks negative counts
* added test for negative numbers
2 files changed