Indicating the weight by electrical means, e.g. using photoelectric cells involving digital counting during the movement of a coded element