To find the number of goats, we start with the given ratio of goats to sheep, which is 4:7. We can denote the number of goats as \( G \) and the number of sheep as \( S \). Given that \( S = 28 \), we can set up the ratio as follows:
\[ \frac{G}{S} = \frac{4}{7} \]
Substituting \( S \) with 28, we have:
\[ \frac{G}{28} = \frac{4}{7} \]
To solve for \( G \), we can cross-multiply:
\[ G \cdot 7 = 4 \cdot 28 \]
Calculating the right side:
\[ 4 \cdot 28 = 112 \]
Thus, we have:
\[ 7G = 112 \]
Now, we solve for \( G \):
\[ G = \frac{112}{7} = 16 \]
Therefore, the number of goats at the farm is \( \boxed{16} \).