The rank of SO(3) is 1, the rank of SO(4) is 2. I'm trying to understand the definition of rank of a group with those two examples.
The rank of a group is the cardinality of the smallest generating set. The definition from Wikipedia is given in the first sentence. (Link to wikipedia: https://en.wikipedia.org/wiki/Rank_of_a_group)
Definition of generating set: "a generating set of a group is a subset such that every element of the group can be expressed as a combination (under the group operation) of finitely many elements of the subset and their inverses. "
In the case of SO(3), the group operation would be (matrix-)multiplication and there is no way one could express all the uncountably many rotations in the xy-plane with a finite product of matrices.
Since you're asking about the Lie groups $SO(3)$ and $SO(4)$, you're looking at the wrong definition of rank.
You don't want the rank of a group meaning the minimal number of generators; for an uncountable group, that rank is uncountable, as you suspected.
Instead you want the rank of a Lie group, and I quote from that link: "For connected compact Lie groups... the rank of the Lie group is the dimension of any one of its maximal tori."