Checking number of of columns in a row
You could try: 


Using Multiple selectors   
Moving the calculation logic to a function so that you can re-use it elsewhere or refactor/change in a single place if the need be.    


Applying this you get something like the following:

row.children('[class*="size-"],[class*="offset-"],[class*="push-"],[class*="pull-"]').each(function () {
            columns += getCurrentSize(this);
        });

 function getCurrentSize(element){
     return Number($(element).attr('class').match(/\d+$/)[0]);
 }


However, if you want each class to be evaluated separately, as mentioned in the comments, you could first try adding these elements to an array and then perform a common action on them. Something like - 

var uniqueClassColumns = [];
uniqueClassColumns.push($('[class*="size-"]'));
uniqueClassColumns.push($('[class*="offset-"]'));
uniqueClassColumns.push($('[class*="push-"]'));
uniqueClassColumns.push($('[class*="pull-"]'));

uniqueClassColumns.each(function () {
                columns += getCurrentSize(this);
            });

     function getCurrentSize(element){
         return Number($(element).attr('class').match(/\d+$/)[0]);
     }