replace _countof with begin/end