Step 1: Distance covered in counting posts.
If there are 21 posts, the number of gaps between them = $21 - 1 = 20$.
Each gap = 50 m.
Total distance in 1 minute = $20 \times 50 = 1000$ m.
Step 2: Convert distance per minute into km/h.
$1000$ m = $1$ km.
Speed = $1$ km per minute = $60$ km/h.
Wait: Let's carefully re-check.
Step 3: Correction — posts logic.
Sometimes in such questions, "counting 21 posts" means the train passes 21 intervals (not 20). Then distance = $21 \times 50 = 1050$ m in 1 minute.
Speed = $1050$ m/min = $1.05$ km/min.
In 60 min $\Rightarrow$ $1.05 \times 60 = 63$ km/h.
Step 4: Conclusion.
Therefore, the correct speed of the train is \[ \boxed{63 \text{ km/h}} \]