You should understand that the Russians as native speakers use a lot of language stuff unconsciously. When I was in Germany as an exchange student I was asked the same question and I couldn't understand it because I didn't know that is so baffled - the Germans explained it to me that we use
1 -> nominative singular;
2, 3, 4 -> genitive singular;
5 - 20 -> genitive plural,
but attention, please! -> 21, 31, 41, ..., 91, 101, 201, ..., 901, 1001, xxx(x)1 -> nominative singular!;
22, 23, 24;32, 33, 34; ...; 92, 93, 94; 102, 103, 104; ..., 902, 903, 904; 1002, 1003 , 1004; ....; xxx(x)2, xxx(x)3, xxx(x)4 -> genitive singular!
5 - 20, 25 - 30, ..., 95 - 100, 105 - 120, 125 - 130, ... -> genitive plural!