Standalone version of libmovescount from openambit project