tva moje da stane neshto ot roda na 
for (size = 0, int i = 0; i < input.length; i++) {
  size += input[i] == value ? 1 : 0;
}