Somatic cells counts increase when there is mastitis (udder infection) and someimtes from stress, I believe. (If I recall ... we haven't had cows for about 18 months and some of this is getting fuzzy) The numbers can vary quite a bit.
The vet used something called a California Mastitis Test -- a paddle with four sections, one for each quarter, and a reagent that would turn darker and darker purple the higher the cell count. (Might be available from farm supply catalogs)
You can have a chronic cow because the bacteria have found a permanent home in the udder, or an acute case that ruins the cow. (We had one that got blood poisoning and died, even with good care)
I will say at times when our cows' cell counts were high, the milk we used in the house, even though pasteurized, did not last as long.
When we sold milk the dairy tested the bulk tank sample (aggregate of all the cows). As I recall (and I might have some of this mixed up) for somatic cell (signs of infection) added water

(we did have one neighbor who got caught running the hose in the tank to boost the milk weights) sediment (cleanliness) plate count (I think this was called PI and had to do with what bacteria were present) and psychotrophic bacteria (cold tolerant varieties that indicated how well the refrigeration and sanitation was going)
when we belonged to the Dairy Herd Improvement Assn. (DHIA) the tester took individual samples. Results included milk weights, fat and protein content and somatic cell. However, we had the tester out once a month and there was a fee. They would sent the individual test vials to Michigan State for analysis. They not only analyzed the milk itself but production data on the cow to give projected production for each one. Very useful information but kind of expensive.
The vet and the dairy had some test kits for checking the milk to be sure milk from treated cows was OK to sell again ... but that's not what you are looking for, I guess.
Back in the day when there was a lot of testing going on for TB and so on, I believe vets and/or county ag agents did it during farm visits.
(I don't know if this helps or not ...)
Ann