On Calculating the Cardinality of the Value Set of a Polynomial (and some related problems)