Count Mills in Nine Men's Morris Introduction
Nine Mens's Morris (also called Mills) is a board game for two players which is played on the following board (image taken from the linked Wikipedia-page):

Each player has 9 men, colored black and white. The concrete rules are not important for this challenge, but check out the Wikipedia-page if you are interested.
The Challenge
Given a grid as input, which represents a certain boardstate, output the total mill count m with 0&lt;=m&lt;=8.
Three men of the same color form a mill when they are in a straight row of connected points.  b2 to f2 is not a mill since the men are of different color. Also d2 to d5 would not form a mill since the three points have to be connected.
The board in the image above contains two mills for example. One from f2 to f6 and one from e3 to e5.
Input
The board is represented as a 2D grid with 24 points which are connected as shown in the example image above. The example  uses letters from a-g for the columns and numbers from 1-7 for the rows, but you may choose any reasonable input format as long as it maps 24 unique coordinates to one of the following states:

Empty
Taken by black
Taken by white

The concrete repersentation is up to  you you are not restricted to &quot;b&quot; or &quot;w&quot; for the colors.
Besides this, your input may not contain any additional information.
Additional notes

You don't have to map the points by any kind of values. If you want to take the input as a 2D array, that's fine as well. But keep in mind that not all points in there are used and that you have to consider the connections between them.
The input might be empty, in which case you have to output zero (empty board -&gt; no mills).
Since each player has 9 men, the input will never contain more than 18 taken points.
You may leave out emtpy points in the input and therefore only input points which are taken.
The input may be ordered in any way. You can't rely on a specific order.
You may assume that the input will always be valid. This means that there won't be more than 9 men of each color and that each point will be unique.

Rules

Make clear which input format you use in your solution. Providing an example run of your program is hightly encouraged.
Function or full program allowed.
Default rules for input/output.
Standard loopholes apply.
This is code-golf, so lowest byte-count wins. Tiebreaker is earlier submission.

Test cases
The input format here is a list of tuples with the coordinates as in the example above as first element and the state of the point second element. A point taken by white is marked as &quot;w&quot; and a point taken by black as &quot;b&quot;. All other points are left out and are empty.

[("a4","w"),("b2","b"),("b4","b"),("c4","b"),("d1","w"),("d2","w"),("e3","w"),("e4","w"),("e5","w"),("f2","b"),("f4","b"),("f6","b"),("g4","w")] -> 2
[("a1","b"),("a4","b"),("a7","b"),("b4","b"),("c4","b"),("d3","w"),("d2","w"),("d1","w")] -> 3
[] -> 0
[("b4", "b"),("a4",b"),("c4",w")] -> 0
[("b4", "b"),("a4",b"),("c4",b")] -> 1
[("a1", "b"),("a4", "b"),("a7", "b"),("b2", "b"),("b4", "b"),("b6", "b"),("c3", "b"),("c4", "b"),("c5", "b"),("e3", "w"),("e4", "w"),("e5", "w"),("f2", "w"),("f4", "w"),("f6", "w"),("g1", "w"),("g4", "w"),("g7", "w")] -> 8

Happy Coding!
JavaScript (ES6), 276 228 125 117 105 bytes
a=&gt;btoa`i·yø!9%z)ª»-ºü1j;ÝÈ%¥·¡ªÜ&quot;·ç¹Ê1`.replace(/.../g,b=&gt;(a[b[0]]+a[b[1]]+a[b[2]])/3&amp;1||'').length

(the above contains some unprintable ascii characters that won't show up here, so here's a version without the btoa that can be copied and run)
a=&gt;'abcdefghijklmnopqrstuvwxajvdksglpbehqtwimrfnucox'.replace(/.../g,b=&gt;(a[b[0]]+a[b[1]]+a[b[2]])/3&amp;1||'').length

Breaks a reference string into letter triplets that match up with mill group keys. Input is in the form of an object, where keys are the letters a-x, starting from the bottom left and ending in the top right, moving left-to-right first. Values are 1 for white, -1 for black, and 0 for blank.
Example
{b:1,d:-1,e:1,f:-1,i:1,k:-1,l:-1,m:1,n:-1,r:1,u:-1} =&gt; 2
{j:1,d:-1,k:-1,l:-1,b:1,e:1,i:1,m:1,r:1,f:-1,n:-1,u:-1,o:1} =&gt; 2
{a:-1,j:-1,v:-1,k:-1,l:-1,h:1,e:1,b:1} =&gt; 3
{} =&gt; 0
{k:-1,j:-1,l:1} =&gt; 0
{k:-1,j:-1,l:1} =&gt; 1
{a:-1,j:-1,v:-1,d:-1,k:-1,s:-1,g:-1,l:-1,p:-1,i:1,m:1,r:1,f:1,n:1,u:1,c:1,o:1,x:1} =&gt; 8

These examples are taken from OP's examples, converted to the letter-key and number-value object. The first is from the example image, while the others are from the example set.