Use NSUInteger instead of int (silence warnings)

As requested, here's a pull request that changes a type to silence some warnings. Tests continue to pass.