4. Let $A$ be a $3 \times 9$ grid, and fill each small cell with a positive integer. A sub-grid of $A$ of size $m \times n (1 \leqslant m \leqslant 3, 1 \leqslant n \leqslant 9)$ is called a "good rectangle" if the sum of all its numbers is a multiple of 10; a $1 \times 1$ cell in $A$ is called a "bad cell" if it is not contained in any "good rectangle". Find the maximum number of "bad cells" in $A$.
First, we prove that there are no more than 25 bad cells in $A$. Otherwise, there is at most one small square in $A$ that is not a bad cell. By the symmetry of the table, we can assume that all the small squares in the first row are bad cells.

Let the numbers filled in the $i$-th column from top to bottom in the grid $A$ be $a_{i}, b_{i}, c_{i}, i=1,2, \cdots, 9$, and let $S_{k}=\sum_{i=1}^{k} a_{i}, T_{k}=\sum_{i=1}^{k}\left(b_{i}+c_{i}\right), i=1,2, \cdots, 9, \quad S_{0}=T_{0}=0$.
We prove that the three sets of numbers $S_{0}, S_{1}, \cdots, S_{9} ; T_{0}, T_{1}, \cdots, T_{9}$ and $S_{0}+T_{0}, S_{1}+T_{1}, \cdots, S_{9}+T_{9}$ are all complete residue systems modulo 10.

Suppose there exist $0 \leqslant m<n \leqslant 9$ such that $S_{m} \equiv S_{n}(\bmod 10)$, then
$\sum_{i=m+1}^{n} a_{i}=S_{n}-S_{m} \equiv 0(\bmod 10)$, which means the cells from the $(m+1)$-th column to the $n$-th column in the first row form a good rectangle, contradicting the assumption that all cells in the first row are bad cells;

Similarly, if there exist $0 \leqslant m<n \leqslant 9$ such that $T_{m} \equiv T_{n}(\bmod 10)$, then $\sum_{i=m+1}^{n}\left(b_{i}+c_{i}\right)=T_{n}-T_{m} \equiv 0(\bmod 10)$, which means the cells from the $(m+1)$-th column to the $n$-th column in the 2nd and 3rd rows form a good rectangle, implying that at least 2 small squares are not bad cells, which is a contradiction;

Similarly, there do not exist $0 \leqslant m<n \leqslant 9$ such that $S_{m}+T_{m} \equiv S_{n}+T_{n}(\bmod 10)$.
Therefore, $\sum_{k=0}^{9} S_{k} \equiv \sum_{k=0}^{9} T_{k} \equiv 0+1+\cdots 9 \equiv 5(\bmod 10) \Rightarrow \sum_{k=0}^{9}\left(S_{k}+T_{k}\right) \equiv 0(\bmod 10)$, thus there are no bad cells in $A$, which is a contradiction.

On the other hand, construct a $3 \times 9$ grid as follows, and it can be verified that each small square not filled with 10 is a bad cell, with 25 bad cells in total. Therefore, the maximum number of bad cells is 25.