Translate
counting code - manual