Generalized linear models (GLMs) that use a regression procedure to fit relationships between predictor and target variables are widely used in risk insurance data. It is crucial to detect the risk factors that significatively affect the number of claims, as this will eventually allow the insurer to fix premiums more precisely. We pay attention to power series distributions, instead of the exponential family, and develop a Bayesian methodology as an alternative to traditionally used maximum-likelihood-based methods. We use sampling-based methods in order to detect relevant risk factors in an automobile insurance data set. This new model allows us to incorporate the presence of an excessive number of zero counts and overdispersion phenomena (where the variance is larger than the mean). Then, we validate this model by comparing the results with other standard and Bayesian models. As part of the process of validation, information criteria such as the deviance information criterion (DIC), Akaike information criterion (AIC) and Bayesian information criterion (BIC) have been considered. For real data collected from 2004 to 2005 in an Australian insurance company, an example is provided using the Markov chain Monte Carlo method; this is developed using the WinBUGS package. The results show that the new Bayesian method outperforms the previous models.