`typeof (*count)` != `typeof (i)`, both should be `unsigned` or `size_t`. Making parameters smaller to ensure the input range is a very bad antipattern.