Or the number of colors in the flag? I think it's harder than that though. Maybe we need to figure out what country those flags belong to.
These should be right:
[( CUBA * NAMIBIA ) + MADAGASCAR ] mod 163
[( MICRONESIA, FEDERATED STATES OF / SENEGAL ) * GEORGIA ] mod 23
[ PORTUGAL - RUSSIA - LIECHTENSTEIN ] mod 18
[( ARGENTINA * SEYCHELLES ) / MACAU ] mod 5
[( BOSNIA AND HERZEGOVINA + INDIA ) / BRAZIL ] mod 2
(looks like the image display order is different for different folks... based on the image names, mine (above) is 51762.)