Output column number according to active sidebars

Use the array_filter() function, which will remove every array element that has false as the value. Then you can count the array length. So your example would look like this:

$sidebars = array(
        is_active_sidebar( 'footer-4' ),
        is_active_sidebar( 'footer-3' ),
        is_active_sidebar( 'footer-2' ),
        is_active_sidebar( 'footer-1' ),
);

$active_sidebars = array_filter($sidebars);

echo 'col-'.count($active_sidebars);