function c = totalcount(lines,k)
  c=0;
  for i=1:length(lines)
    c=c+count(text2stream(lines{i}),k);
  end;