use -c as parameter to weight function in weightedcount