Count Mills in Nine Men's Morris
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.