The number of breweries is going to be closely connected to the number of people, so I would say that the peak was probably in the 1840s. It seems to have been the 1860s that Guinness, under Benjamin Lee, really began to flex its corporate muscle and start shafting the opposition. The Dublin brewers had a cosy price-fixing arrangement in place, led by Guinness who were making much bigger profits on it than anyone else. Maunders left the cartel in 1868, followed by others, and Guinness just put them out of business one-by-one.
In the country it seems to be more of an offer-you-can't-refuse situation: Guinness offered breweries financial security and an easy life as bottlers of Guinness.