Remove Element

remove all the instances of the target element from an array and get the
new length