One of those should sense the position of the mount:
https://www.sparkfun.com/products/10289
The rest could be a DC motor (that moves the weight by means of worm drive, from old video recorder for example) with limit switches, driven in direction according to a position of above switch.. the weight does not have to be huge.. 100g should be enough.
But, I think the way better approach is exact balance - too many things can go wrong even without automatic counterbalancing.