You will need at least 3 points to detect a direction of contour. Create a ray using the first 2 points (by connecting them, with the origin of the ray being the first point). If the third point is to the "left" of the ray, the direction of the contour is counterclockwise. If the third point is the the "right" of the ray, the direction of the contour is clockwise.
You can check if the third point is to the left or right of the ray by checking the slope of the ray then seeing if the point is above or below the point on the ray that has the same x-coordinate as the third point. One gotcha to look out for is if the slope of the ray is infinity (i.e., a vertical line). In this special case, all you need to do is check if the point is to the left or right of the ray's x-coordinate. If the slope is zero (i.e., a horizontal line), you just check if the third point is above or below the ray's y-coordinate.
Just a quick tip, because I know this basic of math can slip easily once you've had higher maths, slope is calculated by "rise over run" (i.e., y-coordinate differences between two points, calculated by x-coordinate differences between those same two points). And you'll probably be making good use of the good old "y = mx + b" slope-intercept equation.
Oh, and one more thing. If you have a math library you can use, the cross product can be used to calculate whether the 3 points are in a clockwise or counterclockwise orientation. This is a common technique in 3D rendering. Just make a triangle out of 3 of the points. You can read more about this technique:
here. Using this technique should speed up the calculation, if that is important.