count type safety