corrected COUNT on output