count is an in/out, not just an out var