I think it's good, numpy's int64 is compatible with Python's int, so we need to cast `counts` either to `np.int64` or `int`.