------
## 最终结论
```python
def countServers(grid):
    m = len(grid)
    n = len(grid[0])
    
    row_count = [0] * m
    col_count = [0] * n
    result = 0
    
    # Traverse the grid to count servers in each row and column
    for i in range(m):
        for j in range(n):
            if grid[i][j] == 1:
                row_count[i] += 1
                col_count[j] += 1

    # Check each server to see if it can communicate with others
    for i in range(m):
        for j in range(n):
            if grid[i][j] == 1 and (row_count[i] > 1 or col_count[j] > 1):
                result += 1

    return result
```