Count code directly