count: add initialization guard