Mastitis is a major disease affecting the herds of dairy farmers worldwide. One of the indicators directly related to the widespread infection of this disease in herds is the bulk tank somatic cell count (BTSCC). Recent studies have shown that one of the risk factors associated with mastitis is the human factor. Therefore, understanding the influence of humans is essential to control and prevent the disease. The main goal of this study was to determine whether the motivations and barriers perceived by farmers could explain the variation in the BTSCC. This study was conducted at 75 dairy farms in southern Brazil. In the interviews with farmers, a survey based on Likert scale items was used to collect data. Structural equation models were used to explain the subjectivity in the ratio of observed variables and latent variables elucidating the possible causal relationships between the variables. The model indicated that some of the variation in the BTSCC can be explained by the farmer’s behavior, which is elucidated by his/her motivations and barriers. The correlations between motivations and the BTSCC and between barriers and the BTSCC were positive. These findings suggest that variations in the BTSCC can be explained by the motivations and barriers perceived by farmers and that the Fogg Behavior Model used in this study can be used to explain how human behaviors influence mastitis control. This study also indicates that consulting companies focused on improving milk quality should pay attention to the human factor to reduce these barriers.