Increasing milk quality in smallholder dairy farms will result in a greater quantity of milk being delivered to milk collection centers, an increased milk price for farmers and consequently an improved farmers’ livelihood. However, little research on milk quality has been performed on smallholder farms in Southeast Asia. The objective of this study was to identify risk factors associated with somatic cell count (SCC) and total plate count (TPC) in Indonesian smallholder dairy farms. One dairy cooperative in West Java, Indonesia was selected based on its willingness to participate. All 119 member farmers in the cooperative, clustered in six groups, were interviewed and a bulk milk sample from all farms was collected in April 2022. Risk factors associated with dairy farms’ SCC and TPC were investigated using multivariable population-averaged generalized estimating equations (GEE) models. The mean geometric SCC and TPC from these farms were 529,665 cells/mL of milk and 474,492 cfu/mL of milk, respectively. Five risk factors including manure removal frequency, receiving mastitis treatment training, washing the udder using soap, number of workers, and ownership of the pasture area were associated with SCC. Two risk factors, manure removal frequency and dairy income contribution, were associated with TPC. These findings can therefore be used as a starting point to improve udder health and milk quality in Indonesia and other countries where smallholder farmers play a significant role in milk production.