Medium
Given an m x n board where each cell is either 'X' (part of a battleship) or '.' (empty), return the number of battleships. Battleships are placed horizontally or vertically, and no two battleships are adjacent (there is at least one empty cell between them).
Input: board = ["X..X","...X","...X"] Output: 2
Input: board = ["."] Output: 0