bash scripts for generating counts in windows