add writer for count