A flexible model for correlated count data, with application to analysis of gene expression differences in multi-condition experiments