If count really is a long, as the old code appeared to believe, you should use "%ul" (and if it were a long long, you'd be using a woolly format specifier, in Norwegian).