Time to do the real world after all data inputs available in the quality needed. Use the full B4P capabilities and function libraries such as statistics functions to analyze the data and draw meaningful conclusions. The functions listed below could be of interest, but check the function library first before implementing something wtih low level code such as individual calculations.
Do some validation on this table:
languages in focus[] = { Chinese, English, French, Spanish, German, Russian, Hindi };
table keep selected rows ( countries, (tokenize( [Languages], {}, {' ',','} ) & languages in focus[]) != {} );
table insert columns ( countries, languages in focus[] );
table process cells in columns ( countries, languages in focus[], if ([Languages] = '*'+soft([.,0])+'*') [.]=1; );
table list( countries, briefly, 8 ); // List first and last 8 rows only
table delete columns ( countries, {'Alpha-2 code', Languages} );
table copy table ( countries, summary );
table keep columns ( summary, languages in focus[] );
table consolidate ( summary, {}, languages in focus[], sum );
table transpose ( summary );
table insert rows ( summary, 0 );
[ summary: ..,0] = { Language, '# Countries' };
table sort rows ( summary, '# Countries', numeric down);
echo ("Brief summary on key languages:");
table list ( summary );
Row #: Code Text _______________________________________________________
1: include ( Support Library );
2: table load ( countries, temp.csv); // Hide! Step 6 begins
3: languages in focus[] = { Chinese, English, French, Spanish, German, Russian, Hindi };
4: table keep selected rows ( countries, (tokenize( [Languages], {}, {' ',','} ) & languages in focus[]) != {} );
^
Inside an expression supplied as a parameter to function 'table keep selected rows':
Attempting to access table with column name [Languages].
Specified table column name or number is invalid.
Code execution will stop. Going to interactive mode
-------------------------------------------------------------------------------
Type 'help' for help, 'docs' or 'toc' for online B4P documentation.
>>