Added a count variable to Element and CandidateElement

Not working yet