Given a grid of 0s and 1s, count the number of connected regions of 1s, where two 1-cells are connected if they are horizontally or vertically adjacent.